Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95385

Floorplan temperature

$
0
0

@olivierjag2 wrote:

hi

i have question:

with my sensor in my floorplan a used this script and I work fine. But when a click on my plan, I cannot change the temperature for my climate

  • name: Sensors
    entities:
    - sensor.bureau_temperature
    text_template: '${entity.state ? entity.state : “unknown”}
    class_template: ’
    var temp = parseFloat(entity.state.replace("¡", “”));
    if (temp < 10)
    return “temp-very-low”;
    else if (temp < 15)
    return “temp-below-average”;
    else if (temp < 21)
    return “temp-medium”;
    else
    return “temp-very-high”;

now with my climate i test this but i don’t work, can you help me?

        - name: climate
          entities:

            - climate.sinope_climate_bureau
           
          text_template: '${entity.state ? entity.attributes.current_temperature + "°" : "undefined"}'
          class_template: '  
            var temp = parseFloat(entity.state.replace("¡", ""));
            if (temp < 10)
              return "temp-very-low";
            else if (temp < 19)
              return "temp-below-average";
            else if (temp < 21)
              return "temp-medium";
            else
              return "temp-very-high";
              
             '

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 95385

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>