How To display climate ?
Hello, thanks for the job fir this module
I use it fir display sensor information whitout problem. i would like to display my climate like in my HA but i don't know how to do this. Can you explain me? I'm not an expert about the template conf and i don't know how to find and use the correct CSS
{ module: 'MMM-HomeAssistantDisplay', position: 'top_right', config: { host: "homeassistant.local", token: "MyToken", port: 8123, title: "Température salon", class: "inEnviro", sections: [{ triggerEntities: [ "sensor.sonoff_a48007a19f_temperature", "sensor.sonoff_a48007a19f_humidity", "sensor.sonoff_a48007a19f_battery", "climate.chauffage_salon" ], displayTemplate:
{{ states('sensor.sonoff_a48007a19f_temperature') }}°C
{{ states('sensor.sonoff_a48007a19f_humidity') }}%
{{ states('sensor.sonoff_a48007a19f_battery') }}%
{{ states('climate.chauffage_salon') }}
, }] }, },
`title: Maison views:
- path: default_view
title: Home
badges:
- type: entity show_name: false show_state: true show_icon: true color: '' entity: sensor.sonoff_a48007a19f_temperature
- entity: sensor.temperature_couloir_temperature
- entity: sensor.temperature_cuisine_temperature
- entity: sensor.temperature_etage_temperature cards:
- type: entities
entities:
- switch.lit_socket_1
- switch.veilleuse_lena_socket_1 title: Chambre léna
- type: grid
square: false
columns: 1
cards:
- type: entities
entities:
- entity: sensor.sonoff_a480046434_temperature
- entity: sensor.sonoff_a480046434_humidity
- entity: sensor.sonoff_a480046434_battery title: Couloir
- type: thermostat
entity: climate.chauffage_couloir
features:
- type: climate-hvac-modes
hvac_modes:
- 'off'
- heat_cool
- cool
- dry
- heat
- cool
- type: climate-hvac-modes
hvac_modes:
- type: entities
entities:
- type: entities
entities:
- sensor.temperature_etage_humidite
- sensor.temperature_etage_temperature title: etage
- type: grid
square: false
columns: 1
cards:
- type: entities
entities:
- entity: switch.guirlande_socket
- entity: light.mur_du_salon
- entity: sensor.sonoff_a48007a19f_temperature
- entity: sensor.sonoff_a48007a19f_humidity title: Salon
- type: thermostat
entity: climate.chauffage_salon
features:
- type: climate-hvac-modes
hvac_modes:
- 'off'
- heat_cool
- cool
- dry
- heat
- cool
- type: climate-hvac-modes
hvac_modes:
- type: entities
entities:
- type: entities
entities:
- person.jerome
- type: grid
square: false
columns: 1
cards:
- type: media-control entity: media_player.chambre_jay
- type: media-control entity: media_player.chambre_jay_hub
- type: media-control entity: media_player.cuisine
- type: media-control entity: media_player.tele_salon
- type: entities
entities:
- light.mur_du_salon_2
- light.wiz_tunable_white_511e69 title: Lumière
- type: weather-forecast entity: weather.forecast_maison show_forecast: false
- type: entities
entities:
- scene.allumer_chauffage_couloir
- scene.eteindre_chauffage_couloir title: Scène
- title: Cuisine
path: cuisine
badges:
- entity: sensor.temperature_cuisine_temperature cards:
- type: entities
entities:
- switch.prise_entree_commutateur
- sensor.prise_entree_courant
- sensor.prise_entree_puissance
- sensor.prise_entree_summation_delivered
- sensor.prise_entree_tension
- sensor.temperature_cuisine_humidite
- sensor.temperature_cuisine_temperature title: Cuisine
- type: entities
entities:
- entity: sensor.sonoff_a48007d4cf_humidity name: Humidity
- entity: sensor.sonoff_a48007d4cf_temperature name: Temperature title: Température cuisine `
when i click on template idetor on my HA : i use defaut temlplate `{## Imitate available variables: ##} {% set my_test_json = { "temperature": 25, "unit": "°C" } %}
The temperature is {{ my_test_json.temperature }} {{ my_test_json.unit }}.
{% if is_state("sun.sun", "above_horizon") -%} The sun rose {{ relative_time(states.sun.sun.last_changed) }} ago. {%- else -%} The sun will rise at {{ as_timestamp(state_attr("sun.sun", "next_rising")) | timestamp_local }}. {%- endif %}
For loop example getting entity values in the weather domain:
{% for state in states.weather -%} {%- if loop.first %}The {% elif loop.last %} and the {% else %}, the {% endif -%} {{ state.name | lower }} is {{state.state_with_unit}} {%- endfor %}.`