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

entities vs. state_attr. (Solved it myself, thank you!!!) #159

Open
RobertoCravallo opened this issue Feb 27, 2023 · 1 comment
Open

entities vs. state_attr. (Solved it myself, thank you!!!) #159

RobertoCravallo opened this issue Feb 27, 2023 · 1 comment

Comments

@RobertoCravallo
Copy link

RobertoCravallo commented Feb 27, 2023

Not an issue as such!!!

Thank you for your troubles, cool card!!

I am using sensor.kuche_fenster_shutter1_position but that does not update when the shutter is moving. I would need to use "state_attr('cover.kuche_fenster_cover_1','current_position')" to get the current position. This is updated as the window cover moves.

So how do I get this to work with the bar-card? In mushroom I have got this all worked out as "secondary information" and the % text is updated nicely as the cover moves. When using sensor.kuche_fenster_shutter1_position, the update occurs seconds after the cover has stopped moving. Not nice and also not very informative as it is not updated in real time.

Can't figure out, how to implement this with the bar-card.

Regards from Germany,

Robert

Was looking around and found, there is a "attribute"!! Can't figure out, how to get this info there....

@RobertoCravallo
Copy link
Author

`type: custom:bar-card
title: ''
columns: '3'
color: grey
min: '0'
max: '100'
positions:
icon: 'off'
indicator: 'off'
minmax: 'off'
title: inside
value: inside
entities:

  • entity: cover.tm_c_livingroom_cover_1_2
    name: Wohnnen
    icon: mdi:window-shutter-open
    attribute: current_position
  • entity: cover.wohnzimmer_tur_cover_1
    name: Tür
    icon: mdi:window-shutter-open
    attribute: current_position
  • entity: cover.kuche_fenster_cover_1
    name: Küche
    icon: mdi:window-shutter-open
    attribute: current_position
    unit_of_measurement: '%'
    severity:
  • color: green
    from: '100'
    to: '100'
  • from: '0'
    to: '0'
    color: red
  • from: '1'
    to: '99'
    color: grey
    `
    Figured it out. Very cool, you thought of everything.... ;-)

@RobertoCravallo RobertoCravallo changed the title entities vs. state_attr entities vs. state_attr. (Solved it myself, thank you!!!) Feb 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant