-
Hello Basically, I want to change temperature color using temperature value and humidity value in the same room It's set up like this:
I need to calculate value for sensor.mitemp_a_temperature using sensor.mitemp_a_humidity, sensor.mitemp_b_temperature using sensor.mitemp_b_humidity and so on How do I get the state of sensor.mitemp_a_humidity inside the JS code? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
All entities are exposed. Use the hass entity. For example.
|
Beta Was this translation helpful? Give feedback.
All entities are exposed. Use the hass entity. For example.
service_data: '${parseFloat(entity.state.replace(/\s{2,}/g,"") / hass.states["sensor.shellyplus1pm_a8032abc17c4_switch_0_voltage"].state).toFixed(1)}A'