Bonjour,
J’espère que je suis dans la bonne rubrique.
J’ai positionné un capteur d’ouverture sur une fenêtre. Dans le broker Mosquito, le capteur est affiché ainsi :
Pour avoir une cohérence, je modifie le contenu de l’onglet 'Affiché en tant que"…
Une fois validé, l’icône associé à la fenêtre s’affiche correctement mais le texte Porte n’est pas modifié en Fenêtre…
Avez-vous la même chose ? Pouvez-vous m’aider à obtenir une meilleure visibilité ?
Le broker mosquitto n’a aucune idée de ce qu’est un capteur, une porte ou une fenêtre. Il n’est pas coupable
D’ou vient le capteur ? Quelle intégration ? Zigbee2mqtt, zwave, autre…
Il faut soit changer le nom, à la source. Soit du côté HA.
Giga77
Septembre 9, 2023, 4:24
3
Hello
Le problème vient de là:
Si tu veux changer le nom, tu dois juste remplir la partie nom.
Merci pour ton retour.
Je comprends tes propos. Je laisse le nom vide pour que le nom du capteur déclaré dans Mqtt soit repris par défaut.
Voici le paramètre du capteur :
Ce que je ne comprends pas, c’est pourquoi « Porte » est systématiquement rajouté après le nom du capteur. Je souhaite ne pas le voir affiché.
Bonjour,
chez moi c’est pareil, j’ai marquer Porte comme nom du capteur contact. Alors que j’ai nommer le capteur Fenêtre Entrée par Z2M.
Je me demande si c’est pas la nouveauté niveau MQTT sortie le mois dernier et la MAJ de Z2M de ce mois ci, qui ferais qui est le nom porte par défaut.
@WarC0zes : C’est exactement comme cela chez moi.
@golfvert : désolé, je ne t’ai pas répondu et remercié pour ton aide. L’intégration est Z2M. Lorsque je change le nom à la source, cela fait pareil
J’ai vérifier, et j’ai même changer le friendly_name du capteur dans customize.yaml:
binary_sensor.0x00158d0008074924_contact:
friendly_name: Fenêtre Entrée
templates:
icon_color: >
if (state == 'on') return '#ff0000';
return '#00b300';
icon: >
if (state == 'on') return 'phu:double-window-open';
return 'phu:double-window-closed';
Doit y avoir un problème avec MQTT, car le nom Fenêtre Entrée était bien a la place de Porte.
J’y avait pas fait attention.
opened 03:42PM - 08 Sep 23 UTC
integration: mqtt
### The problem
After the recent update, my Aqara door sensors are not working … in Home Assistant, though I see them working just fine in Zigbee2MQTT.
The `binary_sensor` entities have been all been renamed to "Door" on the Home Assistant side, despite retaining their correct descriptive names in Zigbee2MQTT. When I update their name in Zigbee2MQTT to re-sync their names, the entities are fixed, but only until the next time I restart Home Assistant, at which point they all become "Door" again.
### What version of Home Assistant Core has the issue?
core-2023.9.0
### What was the last working version of Home Assistant Core?
_No response_
### What type of installation are you running?
Home Assistant OS
### Integration causing the issue
MQTT
### Link to integration documentation on our website
https://www.home-assistant.io/integrations/mqtt/
### Diagnostics information
_No response_
### Example YAML snippet
_No response_
### Anything in the logs that might be useful for us?
```txt
I saw the following in `ha core logs` after a restart of home assistant:
2023-09-07 22:49:17.755 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: 'value_json' is undefined when rendering '{{ value_json.battery }
2023-09-07 22:49:17.758 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: 'value json' is undefined when rendering '{{ value json.contact }}
2023-09-07 22:49:17.758 ERROR (MainThread) [homeassistant.helpers.template] Error parsing value: 'value_json' is undefined (value: , template: {{ value_json.contact }})
2023-09-07 22:49:17.765 ERROR (MainThread) [homeassistant.til. logging] Exception in state_message_received when handling msg on 'zigbee2mqtt/0×00158d000894c618':
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/mqtt/debug_info.py", line 44, in wrapper
msg_callback(msg)
File "/usr/src/homeassistant/homeassistant/components/mqtt/binary_sensor.py", line 218, in state_message_received
self._config [CONF_NAME],
KeyError: 'name'
2023-09-07 22:49:17.765 ERROR (MainThread) [homeassistant. helpers.template] Template variable error: 'value_json' is undefined when rendering '{{ value_json. device_temperature }}'
2023-09-07 22:49:17.766 ERROR (MainThread) [homeassistant. helpers. template] Template variable error: 'value_json' is undefined when rendering '{{ value_json. power_outage_count }}
2023-09-07 22:49:17.766 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: 'value_json' is undefined when rendering '{{ value_json. state }}'
2023-09-07 22:49:17.767 ERROR (MainThread) [homeassistant.helpers.template] Error parsing value: 'value_json' is undefined (value: , template: {{ value_json. state }})
2023-09-07 22:49:17.767 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: 'value_json' is undefined when rendering '{{ value_json. state }}'
2023-09-07 22:49:17.767 ERROR (MainThread) [homeassistant. helpers. template] Error parsing value: 'value_json' is undefined (value: , template: {{ value_json. state 77)
2023-09-07 22:49:17.767 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: 'value_json' is undefined when rendering '{{ value_json.state }}'
2023-09-07 22:49:17.768 ERROR (MainThread) [homeassistant.helpers.template] Error parsing value: 'value_json' is undefined (value: , template: {{ value_json.state }})
2023-09-07 22:49:17.768 ERROR (MainThread) [homeassistant. helpers.template] Template variable error: 'value_json' is undefined when rendering '{{ value_json. state }}'
2023-09-07 22:49:17.769 ERROR (MainThread) [homeassistant.helpers. template] Error parsing value: 'value json' is undefined (value: , template: {{ value json. state }})
```
### Additional information
_No response_
tient une issue sur ton ( notre ) problème.
1 « J'aime »
Giga77
Septembre 9, 2023, 6:18
9
Je pense que ç’est une issue Z2M.
Car j’ai Mosquitto Broker à jour, mais pas z2m.
Et j’ai « contact »:
Oui, d’après la conversation de l’issue c’est Z2M le fautif