I have a sensor:
tv_status:
friendly_name: "TV Status"
value_template: >-
"{{ is_state_attr('remote.familyroom_hub', 'current_activity', 'Watch TV') or is_state_attr('remote.familyroom_hub', 'current_activity', 'Listen to Music') }}"
It returns “True” when one of my activities are on.
When I try and call it thru my Lovelace card as value “True” or “On” or “true” or “on” or whatever it fails. Any idea how I’m supposed to reference it?
So in the below:
- card:
color: var(--primary-text-color)
color_type: icon
icon: XBox Power Toggle
name: XBox
show_icon: false
size: 25%
entity: sensor.xbox_status
styles:
card:
- border-radius: 30px
- height: 32px
label:
- color: gray
- font-size: 9px
- justify-self: start
- padding: 0px 5px
name:
- font-weight: bold
- font-size: 15px
- padding: 0px 0px
state:
- value: 'true'
styles:
icon:
- color: 'rgb(255,255,255)'
card:
- background: 'rgb(0,128,0)'
name:
- color: white
tap_action:
action: call-service
service: remote.send_command
service_data:
command: PowerToggle
device: Microsoft Xbox 360
entity_id: remote.familyroom_hub
type: 'custom:button-card'
conditions:
- entity: input_select.harmonytvsource
state_not: PowerOff
type: conditional
So in the above I set a value of true but it ignores it or fails. I tried True also but it always lower cases it. If I put double quotes it changes them to single. I can change it to my input_select and it’s value it’s fine.