Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support empty values when using formatting #127

Closed
pinkywafer opened this issue Nov 4, 2020 · 2 comments
Closed

support empty values when using formatting #127

pinkywafer opened this issue Nov 4, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@pinkywafer
Copy link

pinkywafer commented Nov 4, 2020

Formatting works beautifully, as long as the value is set. If a value has not yet been set, the formatting option will display an incorrect result: ie:
a datetime format will display January 1, 1970, 1:00am if the state / attribute selected is None.
It would be nice if either a simple - or None could be displayed in these circumstances

@benct benct added the enhancement New feature or request label Nov 4, 2020
@myhomeiot
Copy link

Please add support brightness option for formatting. At version 4.0.0 you add brightness support to secondary_info but in some cases more useful to have it as separate entity, for example (in my case brightness attribute it's a value from 0-255) :

type: 'custom:auto-entities'
card:
  type: entities
filter:
  exclude:
    - state: 'off'
  include:
    - domain: light
      attributes:
        supported_features: 1
      options:
        type: 'custom:multiple-entity-row'
        secondary_info: last-changed
        state_color: false
        toggle: true
        entities:
          - attribute: brightness
            name: false
            format: !!!brightness option will be great!!!

@benct
Copy link
Owner

benct commented Nov 12, 2020

Should now better handle empty or invalid values in v4.1.0. I've not tested it properly, so let me know if it is not working as expected.

@benct benct closed this as completed Nov 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants