dylandoamaral / uptime-card

Minimalistic uptime card for Home Assistant Lovelace UI
266 stars 11 forks source link

Make `ok` and `ko` templatetable #132

Closed carlos-sarmiento closed 2 years ago

carlos-sarmiento commented 2 years ago

I have a numerical sensor I would like to visualize using the uptime card. Since the state for this sensor can be continuous, there is not a single value that can represent either ok or ko.

Looking at the code, it seems the isOk function is not capable of executing a template to determine dynamically if the value of the sensor should fall on either category.

Would it be possible to add this feature?

dylandoamaral commented 2 years ago

I already thought about it, but I decide to not implement this feature: https://github.com/dylandoamaral/uptime-card/discussions/67. The reason was that the use case was too specific. However, you still can do that using template sensor https://www.home-assistant.io/integrations/template/ creating a binary sensor for the card.