junkfix / numberbox-card

Replace input_number sliders with plus and minus buttons
109 stars 9 forks source link

Card doesn't always update in editor #20

Closed rianadon closed 3 years ago

rianadon commented 3 years ago

When I edit the example in the README (by changing the YAML or using the visual editor), the icons and card will update as I edit its properties. But for some reason, if I am editing the card outside of an entities card, or editing another card with the numberbox-card embedded in it, the card does not update.

I think this might be an issue with shouldUpdate (maybe all that's needed is a check for config changing?)

Steps to reproduce:

  1. Create a numberbox-card by itself

    entity: input_number.slider1
    type: custom:numberbox-card
  2. Set the icon of the card by adding this field to the YAML, or using the visual editor

    icon: mdi:flower
  3. The icon of the numberbox-card displayed to the right of the yaml/editor does not update.

However, as expected, once I close the editor the card will update in the dashboard.

htmltiger commented 3 years ago

I have just updated it and should work now. Thanks