mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-09-07 02:18:43 +00:00
Refactor entity choosing
This commit is contained in:
@@ -21,9 +21,7 @@ with_state_indicator:
|
|||||||
- border-bottom: >-
|
- border-bottom: >-
|
||||||
[[[
|
[[[
|
||||||
let color;
|
let color;
|
||||||
const state_indicator = (!variables.state_indicator_id)
|
const state_indicator = variables.state_indicator_id || entity.entity_id;
|
||||||
? entity.entity_id
|
|
||||||
: variables.state_indicator_id;
|
|
||||||
|
|
||||||
if (entity.state === 'on') {
|
if (entity.state === 'on') {
|
||||||
color = states[state_indicator].state === 'on'
|
color = states[state_indicator].state === 'on'
|
||||||
|
|||||||
Reference in New Issue
Block a user