-
Beta Was this translation helpful? Give feedback.
Answered by
Trzinka
Jan 25, 2024
Replies: 3 comments
-
If I understand correctly you would have in your service data an IF statement which checks if the |
Beta Was this translation helpful? Give feedback.
0 replies
-
Magic man!
|
Beta Was this translation helpful? Give feedback.
0 replies
-
The solution is as follows: - entities:
- sensor.me_bo_current_consumption
tap_action: false
state_action:
action: call-service
service: floorplan.class_set
service_data:
class: >-
${(parseFloat(entity.state) > 0.5) ? "switch-on" :
"switch-off"}
- entities:
- sensor.me_hora_current_consumption
tap_action: false
state_action:
action: call-service
service: floorplan.class_set
service_data:
class: >-
${(parseFloat(entity.state) > 0.5) ? "switch-on" :
"switch-off"}
- entities:
- sensor.me_kl_current_consumption
tap_action: false
state_action:
action: call-service
service: floorplan.class_set
service_data:
class: >-
${(parseFloat(entity.state) > 0.5) ? "switch-on" :
"switch-off"}
- entities:
- sensor.me_natv_current
tap_action: false
state_action:
action: call-service
service: floorplan.class_set
service_data:
class: >-
${(parseFloat(entity.state) > 0.8) ? "switch-on" :
"switch-off"}
- entities:
- sensor.me_prst_current_consumption
tap_action: false
state_action:
action: call-service
service: floorplan.class_set
service_data:
class: >-
${(parseFloat(entity.state) > 0.5) ? "switch-on" :
"switch-off"}
- entities:
- sensor.me_sk_current_consumption
tap_action: false
state_action:
action: call-service
service: floorplan.class_set
service_data:
class: >-
${(parseFloat(entity.state) > 0.5) ? "switch-on" :
"switch-off"}
- entities:
- sensor.me_sptv_current_consumption
tap_action: false
state_action:
action: call-service
service: floorplan.class_set
service_data:
class: >-
${(parseFloat(entity.state) > 11) ? "switch-on" :
"switch-off"}
- entities:
- sensor.me_ss_current_consumptionz
tap_action: false
state_action:
action: call-service
service: floorplan.class_set
service_data:
class: >-
${(parseFloat(entity.state) > 0.5) ? "switch-on" :
"switch-off"}
- entities:
- sensor.me_vhra_current_consumption
tap_action: false
state_action:
action: call-service
service: floorplan.class_set
service_data:
class: >-
${(parseFloat(entity.state) > 0.5) ? "switch-on" :
"switch-off"}
- entities:
- sensor.me_hl_current_consumption
tap_action: false
state_action:
action: call-service
service: floorplan.class_set
service_data:
class: >-
${(parseFloat(entity.state) > 15.5) ? "switch-on" :
"switch-off"} |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Trzinka
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The solution is as follows: