Hi There,
I’ve been looking around the forum but couldn’t find answer.
Is there a way to change the status from a device (like my tv) from Home/Away to On/Off
I’ve setup an entity card like this:
type: entities
entities:
- entity: device_tracker.lgwebostv
This is working with the default Home/Away function.
Easy way is to use a template binary sensor. You might look into the template card for lovelace. I don’t have experience with it, but glancing at the examples leads me to believe you can achieve what you’re after.
Lovelace Templates
I’ve gone and made a crazy card that allows you to pretty much template anything in Lovelace for your card configurations using any information available on the frontend; states, attributes, user, etc.
Want state/attribute-based icons? DONE!
Want dynamic stacks; vertical vs horizontal based on user? DONE!
Want OR conditionals? DONE!
The list is pretty much endless and I’m sure you all will come up with some crazy stuff. Be sure to share.
Go nuts! Enjoy!
1 Like
Yep. It can do that and a lot more
I can’t still get it to work.
Isn’t there an easy way withing a manual card creation?
I configured the LoveLace Templates and tried some thing.
I came up with this but it’s not really working as i expected
type: 'custom:config-template-card'
card:
type: '${vars[0] === ''on'' ? ''custom:hui-glance-card'' : ''custom:hui-entities-card''}'
entities:
- entity: device_tracker.lgwebostv
name: >-
${states['device_tracker.lgwebostv'].attributes.current_state > home ?
'Aan' : 'Uit'}