benct / lovelace-battery-entity-row

Show battery states or attributes with dynamic icon on entity rows in Home Assistant's Lovelace UI
MIT License
68 stars 7 forks source link

Date Breaking Changes #9

Closed LanceMcCarthy closed 3 years ago

LanceMcCarthy commented 3 years ago

Hello,

First, thank you for this card!

In the latest release 2020.12.x, HA made a breaking change in the way it works with dates. Due to this change, the last-changed variable no longer works for secondary-info attribute.

For example:

    - type: 'custom:battery-entity-row'
      entity: sensor.parlor_motion_st_battery
      name: Parlor Motion
      unit: '%'
      secondary_info: last-changed
      warning: 50
      critical: 25

Will result in

image

In a nushell, you need to use a timestamp value, instead of a duration in seconds value. Is this something the card controls or is the 'last-changed' property from the sensor?