custom-cards / slider-button-card

A button card with integrated slider
MIT License
105 stars 16 forks source link

[feat] Add Support for number domain #64

Closed rohankapoorcom closed 10 months ago

rohankapoorcom commented 10 months ago

This adds support for the number domain. The experience and limitations of the input_number domain apply to the number domain as well.

Fixes #43.

Since the logic is nearly identical between the number and input_number domains, I tried to generalize the controller by introducing another level of inheritance and creating a new NumericalController to handle the common behavior and only overriding the set _value() method for each. This ended up breaking the card and I decided to leave that refactor for another day.