- type: custom:button-card
template:
- circle
- light
entity: |
[[[
const controlValue = states['input_text.room_select'].state;
switch (controlValue) {
case 'Reception': return 'switch.reception_on';
case 'Kitchen': return 'switch.kitchen_on';
default: return 'switch.bathroom_on';
}
]]]
name: Fan Light
icon: mdi:lightbulb
size: 75%
show_state: true
aspect_ratio: 1/1
I am trying to change the entity_id based on the name like I'm doing page navigation. However, it won't actually refresh and will only refresh if I leave and enter the dashboard again. Does anyone know of a way to update an entity while it still exists?