I have this rather complicated card to control my RF controllable light.
It’s built with @thomasloven 's custom:hui as it was previously built with the ‘native’ hui.
entities:
- card:
cards:
- color-type: icon
entity: light.trappe
icon: 'mdi:plus'
show_name: false
tap_action:
action: call-service
service: script.send_rf_command
service_data:
RfCode: '#597b01'
RfHigh: 1220
RfLow: 450
RfSync: 12370
type: 'custom:button-card'
- color-type: icon
entity: light.trappe
icon: 'mdi:minus'
show_name: false
tap_action:
action: call-service
service: script.send_rf_command
service_data:
RfCode: '#597b02'
RfHigh: 1220
RfLow: 450
RfSync: 12360
type: 'custom:button-card'
- color-type: icon
entity: light.trappe
icon: 'mdi:lightbulb-off-outline'
show_name: false
tap_action:
action: call-service
service: light.turn_off
service_data:
entity_id: light.trappe
type: 'custom:button-card'
- color-type: icon
entity: light.trappe
icon: 'mdi:lightbulb-outline'
show_name: false
state:
- icon: 'mdi:lightbulb-on'
value: 'on'
tap_action:
action: call-service
service: light.turn_on
service_data:
entity_id: light.trappe
type: 'custom:button-card'
type: horizontal-stack
card_type: conditional
conditions:
- entity: light.trappe
state: 'on'
type: 'custom:hui-element'
- card:
cards:
- color-type: blank-card
style: |
ha-card{background:transparent;box-shadow: none;}
type: 'custom:button-card'
- color-type: blank-card
style: |
ha-card{background:transparent;box-shadow: none;}
type: 'custom:button-card'
- color-type: blank-card
style: |
ha-card{background:transparent;box-shadow: none;}
type: 'custom:button-card'
- color: 'rgb(255,255,255)'
color-type: icon
entity: light.trappe
icon: 'mdi:lightbulb-outline'
show_name: false
state:
- color: 'rgb(255,255,0)'
icon: 'mdi:lightbulb-on'
value: 'on'
tap_action:
action: call-service
service: light.turn_on
service_data:
entity_id: light.trappe
type: 'custom:button-card'
type: horizontal-stack
card_type: conditional
conditions:
- entity: light.trappe
state: 'off'
type: 'custom:hui-element'
- card:
cards:
- color: 'rgb(255,0,0)'
color-type: icon
icon: 'mdi:lightbulb-on'
show_name: false
tap_action:
action: call-service
service: script.send_rf_command
service_data:
RfCode: '#597b05'
RfHigh: 1220
RfLow: 450
RfSync: 12370
type: 'custom:button-card'
- color: 'rgb(0,255,0)'
color-type: icon
icon: 'mdi:lightbulb-on'
show_name: false
tap_action:
action: call-service
service: script.send_rf_command
service_data:
RfCode: '#597b06'
RfHigh: 1220
RfLow: 450
RfSync: 12380
type: 'custom:button-card'
- color: 'rgb(0,0,255)'
color-type: icon
icon: 'mdi:lightbulb-on'
show_name: false
tap_action:
action: call-service
service: script.send_rf_command
service_data:
RfCode: '#597b07'
RfHigh: 1220
RfLow: 460
RfSync: 12380
type: 'custom:button-card'
- color-type: icon
icon: 'mdi:lightbulb-on-outline'
show_name: false
tap_action:
action: call-service
service: script.send_rf_command
service_data:
RfCode: '#597b08'
RfHigh: 1220
RfLow: 450
RfSync: 12360
type: 'custom:button-card'
type: horizontal-stack
card_type: conditional
conditions:
- entity: light.trappe
state: 'on'
type: 'custom:hui-element'
< a lot more of the same stuff>
show_header_toggle: false
title: Trappe
type: entities
I have the light defined like this:
- platform: template
lights:
trappe:
friendly_name: "Trappe"
value_template: "{{ is_state( 'input_boolean.stairs_light' , 'on' ) }}"
turn_on:
- service: script.send_rf_command
data:
RfSync: 12370
RfLow: 450
RfHigh: 1220
RfCode: "#597b04"
- service: homeassistant.turn_on
data:
entity_id: input_boolean.stairs_light
turn_off:
- service: script.send_rf_command
data:
RfSync: 12370
RfLow: 450
RfHigh: 1220
RfCode: "#597b03"
- service: homeassistant.turn_off
data:
entity_id: input_boolean.stairs_light
I can see the input_boolean change state when I turn the light on/off and I can see the light change state as well, but the buttons don’t hide any more?