Replies: 1 comment
-
I took a look through the code and it would seem that the quotes are being added in the HASerializer to all of the JSON values, without a way to override. In order to make this work for me for now, I added an ugly little exception to the HASerializer to look for the string "null" and skip adding the quotes in that case. (I'm sure there's a much more elegant way to do this, however.) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Home Assistant has recently started enforcing a naming convention that discourages an entity from having the same name as its parent device. When both the entity and device have the same name, the name appears twice in Home Assistant dashboards. The correct practice seems to be to ensure that the primary entity for a device has no name at all. And indeed, if you look at the discovery YAML for a correctly set up device, the primary entity will contain "name: null". (with no quotes around the word "null".) For automations that directly use PubSubClient, I have found that using "nullptr" in the discovery payload correctly causes "null" to show up in the discovery YAML and all is right with the world. I have not found a way to achieve the same thing with ArduinoHA. If I fail to use setName at all, there is no name set in the discovery YAML, and this causes strange results in Home Assistant. If I use null with quotes--well, that just literally names the device "null". Has anyone else encountered this, and found a way to set a null name for an entity?
Beta Was this translation helpful? Give feedback.
All reactions