AnthonMS / my-cards

Bundle of my custom Lovelace cards for Home Assistant. Includes: my-slider, my-slider-v2, my-button
Other
99 stars 26 forks source link

Suggestion - support for MQTT numbers #12

Closed Handkep closed 2 years ago

Handkep commented 2 years ago

I think the title says everything. I need to controll my esp8266 via MQTT, but sadly, numbers are not supported. image It would be very nice if you could add this feature

AnthonMS commented 2 years ago

I can look into this the next time I'm working on the card. But what service is called when using a MQTT number entity? Is it also just input_number.set_value?

somegeekintn commented 2 years ago

I'd like to second this suggestion please! And it looks like it would use number.set_value as opposed to input_number.set_value.

AnthonMS commented 2 years ago

I apologize about being so terribly slow. I will look into adding this to the old slider as well as the new slider-v2. Hopefully I get around to it. There are so much I want to do.

AnthonMS commented 2 years ago

This should be resolved for both slider v1 & v2 in version 9692d2e.

Let me know if there are any problems with it. I haven't been able to find much documentation for the actions. So I trust blindly that it is action 'set_value' on entity type 'number' like the user above said. I trusdt that the number entity also has the attributes 'min', 'max' and 'step'. If they don't, then it might break. But I'm pretty sure it does.

But let me know.

somegeekintn commented 2 years ago

I haven't been able to find much documentation for the actions. So I trust blindly that it is action 'set_value' on entity type 'number' like the user above said.

I've just been doing a search and replace of input_number with number as my workaround and it's been working fine so we should be good to go! Thanks!