Bonjour à tous,
Je possède un certain nombre de capteurs LYWSD03MMC.
Je cherche à les intégrer le plus intelligemment possible dans mon dashboard => decluttering_templates
Et plutôt que de passer en paramètre mes 3 entity_id à chaque fois, j’aimerai bien n’en passer qu’une, et remonter au device, pour redescendre sur chacun des 3 sensors.
J’ai donc commencé par petites étapes :
{{ device_id('sensor.humidite_bureau') }}
=> cdbe8109495770d24cdad056dd89703d
{{ device_entities(device_id('sensor.humidite_bureau')) }}
=>
['select.capteur_bureau_temperature_display_mode', 'switch.capteur_bureau_show_smiley', 'switch.capteur_bureau_enable_display', 'number.capteur_bureau_temperature_calibration', 'number.capteur_bureau_humidity_calibration', 'number.capteur_bureau_comfort_temperature_min', 'number.capteur_bureau_comfort_temperature_max', 'number.capteur_bureau_comfort_humidity_min', 'number.capteur_bureau_comfort_humidity_max', 'update.capteur_bureau', 'sensor.humidite_bureau', 'sensor.temperature_bureau', 'sensor.etat_batterie_bureau']
L’idéal serait ici de pouvoir récupérer individuellement chacun des 3 sensor.XXX
Et en allant encore plus loin, j’ai encore plus de détails, mais que je ne sais toujours pas filtrer ni exploiter derrière…
{{ expand(device_entities(device_id('sensor.humidite_bureau')))}}
=>
[<template TemplateState(<state sensor.etat_batterie_bureau=100; state_class=measurement, battery=100, comfort_humidity_max=60, comfort_humidity_min=30, comfort_temperature_max=26, comfort_temperature_min=21, enable_display=ON, humidity=54.53, humidity_calibration=0, linkquality=69, show_smiley=SHOW, temperature=23.98, temperature_calibration=None, temperature_display_mode=celsius, update=installed_version=285224961, latest_version=285224961, state=idle, update_available=None, unit_of_measurement=%, device_class=battery, friendly_name=Capteur bureau Batterie @ 2024-04-03T15:41:45.261037+02:00>)>, <template TemplateState(<state sensor.temperature_bureau=23.98; state_class=measurement, battery=100, comfort_humidity_max=60, comfort_humidity_min=30, comfort_temperature_max=26, comfort_temperature_min=21, enable_display=ON, humidity=54.53, humidity_calibration=0, linkquality=69, show_smiley=SHOW, temperature=23.98, temperature_calibration=None, temperature_display_mode=celsius, update=installed_version=285224961, latest_version=285224961, state=idle, update_available=None, unit_of_measurement=°C, device_class=temperature, friendly_name=Capteur bureau Température @ 2024-04-03T17:29:53.623262+02:00>)>, <template TemplateState(<state sensor.humidite_bureau=54.53; state_class=measurement, battery=100, comfort_humidity_max=60, comfort_humidity_min=30, comfort_temperature_max=26, comfort_temperature_min=21, enable_display=ON, humidity=54.53, humidity_calibration=0, linkquality=69, show_smiley=SHOW, temperature=23.98, temperature_calibration=None, temperature_display_mode=celsius, update=installed_version=285224961, latest_version=285224961, state=idle, update_available=None, unit_of_measurement=%, device_class=humidity, friendly_name=Capteur bureau Humidité @ 2024-04-03T17:24:43.091701+02:00>)>, <template TemplateState(<state update.capteur_bureau=off; auto_update=False, installed_version=285224961, in_progress=False, latest_version=285224961, release_summary=None, release_url=None, skipped_version=None, title=None, device_class=firmware, entity_picture=https://github.com/Koenkk/zigbee2mqtt/raw/master/images/logo.png, friendly_name=Capteur bureau, supported_features=1 @ 2024-04-03T15:41:45.260191+02:00>)>, <template TemplateState(<state number.capteur_bureau_comfort_humidity_max=60; min=0.0, max=100.0, step=1.0, mode=auto, battery=100, comfort_humidity_max=60, comfort_humidity_min=30, comfort_temperature_max=26, comfort_temperature_min=21, enable_display=ON, humidity=54.53, humidity_calibration=0, linkquality=69, show_smiley=SHOW, temperature=23.98, temperature_calibration=None, temperature_display_mode=celsius, update=installed_version=285224961, latest_version=285224961, state=idle, update_available=None, unit_of_measurement=%, friendly_name=Capteur bureau Comfort humidity max @ 2024-04-03T15:41:45.259136+02:00>)>, <template TemplateState(<state number.capteur_bureau_comfort_humidity_min=30; min=0.0, max=100.0, step=1.0, mode=auto, battery=100, comfort_humidity_max=60, comfort_humidity_min=30, comfort_temperature_max=26, comfort_temperature_min=21, enable_display=ON, humidity=54.53, humidity_calibration=0, linkquality=69, show_smiley=SHOW, temperature=23.98, temperature_calibration=None, temperature_display_mode=celsius, update=installed_version=285224961, latest_version=285224961, state=idle, update_available=None, unit_of_measurement=%, friendly_name=Capteur bureau Comfort humidity min @ 2024-04-03T15:41:45.259394+02:00>)>, <template TemplateState(<state number.capteur_bureau_comfort_temperature_max=26; min=-100.0, max=100.0, step=1.0, mode=auto, battery=100, comfort_humidity_max=60, comfort_humidity_min=30, comfort_temperature_max=26, comfort_temperature_min=21, enable_display=ON, humidity=54.53, humidity_calibration=0, linkquality=69, show_smiley=SHOW, temperature=23.98, temperature_calibration=None, temperature_display_mode=celsius, update=installed_version=285224961, latest_version=285224961, state=idle, update_available=None, unit_of_measurement=°C, friendly_name=Capteur bureau Comfort temperature max @ 2024-04-03T15:41:45.259534+02:00>)>, <template TemplateState(<state number.capteur_bureau_comfort_temperature_min=21; min=-100.0, max=100.0, step=1.0, mode=auto, battery=100, comfort_humidity_max=60, comfort_humidity_min=30, comfort_temperature_max=26, comfort_temperature_min=21, enable_display=ON, humidity=54.53, humidity_calibration=0, linkquality=69, show_smiley=SHOW, temperature=23.98, temperature_calibration=None, temperature_display_mode=celsius, update=installed_version=285224961, latest_version=285224961, state=idle, update_available=None, unit_of_measurement=°C, friendly_name=Capteur bureau Comfort temperature min @ 2024-04-03T15:41:45.259697+02:00>)>, <template TemplateState(<state number.capteur_bureau_humidity_calibration=0; min=-100.0, max=100.0, step=0.01, mode=auto, battery=100, comfort_humidity_max=60, comfort_humidity_min=30, comfort_temperature_max=26, comfort_temperature_min=21, enable_display=ON, humidity=54.53, humidity_calibration=0, linkquality=69, show_smiley=SHOW, temperature=23.98, temperature_calibration=None, temperature_display_mode=celsius, update=installed_version=285224961, latest_version=285224961, state=idle, update_available=None, unit_of_measurement=%, icon=mdi:wrench-clock, friendly_name=Capteur bureau Humidity calibration @ 2024-04-03T15:41:45.259834+02:00>)>, <template TemplateState(<state number.capteur_bureau_temperature_calibration=unknown; min=-100.0, max=100.0, step=0.01, mode=auto, battery=100, comfort_humidity_max=60, comfort_humidity_min=30, comfort_temperature_max=26, comfort_temperature_min=21, enable_display=ON, humidity=54.53, humidity_calibration=0, linkquality=69, show_smiley=SHOW, temperature=23.98, temperature_calibration=None, temperature_display_mode=celsius, update=installed_version=285224961, latest_version=285224961, state=idle, update_available=None, unit_of_measurement=°C, icon=mdi:wrench-clock, friendly_name=Capteur bureau Temperature calibration @ 2024-04-03T15:41:06.202280+02:00>)>, <template TemplateState(<state switch.capteur_bureau_enable_display=on; battery=100, comfort_humidity_max=60, comfort_humidity_min=30, comfort_temperature_max=26, comfort_temperature_min=21, enable_display=ON, humidity=54.53, humidity_calibration=0, linkquality=69, show_smiley=SHOW, temperature=23.98, temperature_calibration=None, temperature_display_mode=celsius, update=installed_version=285224961, latest_version=285224961, state=idle, update_available=None, friendly_name=Capteur bureau Enable display @ 2024-04-03T15:41:45.260431+02:00>)>, <template TemplateState(<state switch.capteur_bureau_show_smiley=on; battery=100, comfort_humidity_max=60, comfort_humidity_min=30, comfort_temperature_max=26, comfort_temperature_min=21, enable_display=ON, humidity=54.53, humidity_calibration=0, linkquality=69, show_smiley=SHOW, temperature=23.98, temperature_calibration=None, temperature_display_mode=celsius, update=installed_version=285224961, latest_version=285224961, state=idle, update_available=None, friendly_name=Capteur bureau Show smiley @ 2024-04-03T15:41:45.260561+02:00>)>, <template TemplateState(<state select.capteur_bureau_temperature_display_mode=celsius; options=['celsius', 'fahrenheit'], battery=100, comfort_humidity_max=60, comfort_humidity_min=30, comfort_temperature_max=26, comfort_temperature_min=21, enable_display=ON, humidity=54.53, humidity_calibration=0, linkquality=69, show_smiley=SHOW, temperature=23.98, temperature_calibration=None, temperature_display_mode=celsius, update=installed_version=285224961, latest_version=285224961, state=idle, update_available=None, icon=mdi:thermometer, friendly_name=Capteur bureau Temperature display mode @ 2024-04-03T15:41:45.261641+02:00>)>]
Bref, si une bonne âme qui passe avait une idée magique SVP
(Ou peut-être que sinon, je vais juste attendre les labels qui vont arriver ce soir pour voir si ça ne me simplifierait pas la vie ;))
Merci d’avance !