Hello! I am implementing the MQTT Hass discovery into our hotel automation software (Giano, the Hotel Supervisor) but we have problems with entity_id names.
This is discovery payload sent (with retain) to the topic ‘homeassistant/device/gzcdev-000000000000/config’:
{
"device":{
"identifiers":[
"gzcdev-000000000000"
],
"connections":[
[
"ip",
"192.168.1.128"
],
[
"mac",
"00:1c:42:1c:96:88"
]
],
"name":"GZC-Dev gzcdev-000000000000",
"manufacturer":"GFP Lab S.r.l.",
"model":"GZC-Dev",
"model_id":"gzcdev",
"configuration_url":"http:\/\/192.168.1.128",
"hw_version":"1.0",
"sw_version":"6.0",
"serial_number":"000000000000",
"suggested_area":"building"
},
"origin":{
"name":"Giano Zone Controller",
"sw":"6.0 r7548 (2025\/11\/03 16:56.42)",
"support_url":"https:\/\/support.gfplab.com"
},
"components":{
"binary_power":{
"platform":"binary_sensor",
"name":"Main power",
"unique_id":"gzcdev-000000000000_binary_power",
"default_entity_id":"gzcdev-000000000000_binary_power",
"device_class":"power",
"payload_on":true,
"payload_off":false,
"value_template":"{{ value_json.power }}"
},
"binary_vbus":{
"platform":"binary_sensor",
"name":"Bus voltage",
"unique_id":"gzcdev-000000000000_binary_vbus",
"default_entity_id":"gzcdev-000000000000_binary_vbus",
"device_class":"power",
"payload_on":true,
"payload_off":false,
"value_template":"{{ value_json.vbus }}"
},
"binary_battery":{
"platform":"binary_sensor",
"name":"Battery",
"unique_id":"gzcdev-000000000000_binary_battery",
"default_entity_id":"gzcdev-000000000000_binary_battery",
"device_class":"battery",
"payload_on":true,
"payload_off":false,
"value_template":"{{ value_json.battery }}"
},
"binary_configured":{
"platform":"binary_sensor",
"name":"Configured",
"unique_id":"gzcdev-000000000000_binary_configured",
"default_entity_id":"gzcdev-000000000000_binary_configured",
"device_class":"running",
"payload_on":true,
"payload_off":false,
"value_template":"{{ value_json.configured }}"
},
"binary_connected":{
"platform":"binary_sensor",
"name":"Connected",
"unique_id":"gzcdev-000000000000_binary_connected",
"default_entity_id":"gzcdev-000000000000_binary_connected",
"device_class":"connectivity",
"payload_on":true,
"payload_off":false,
"value_template":"{{ value_json.connected }}"
},
"sensor_used_ram":{
"platform":"sensor",
"name":"Used RAM",
"unique_id":"gzcdev-000000000000_sensor_used_ram",
"default_entity_id":"gzcdev-000000000000_sensor_used_ram",
"icon":"mdi:memory",
"payload_on":true,
"payload_off":false,
"value_template":"{{ value_json.used_ram }}",
"unit_of_measurement":"%"
},
"button_reboot":{
"platform":"button",
"name":"Reboot",
"unique_id":"gzcdev-000000000000_button_reboot",
"default_entity_id":"gzcdev-000000000000_button_reboot",
"device_class":"restart",
"icon":"mdi:restart",
"command_template":"{\"jsonrpc\":\"2.0\",\"method\":\"reboot\",\"id\" : {{ (range(100000) | random) }}}"
},
"button_factory":{
"platform":"button",
"name":"Factory Defaults",
"unique_id":"gzcdev-000000000000_button_factory",
"default_entity_id":"gzcdev-000000000000_button_factory",
"icon":"mdi:restore-alert",
"command_template":"{\"jsonrpc\":\"2.0\",\"method\":\"factory_defaults\",\"id\" : {{ (range(100000) | random) }}}"
},
"button_config_reset":{
"platform":"button",
"name":"Reset config",
"unique_id":"gzcdev-000000000000_button_config_reset",
"default_entity_id":"gzcdev-000000000000_button_config_reset",
"device_class":"update",
"icon":"mdi:file-restore",
"command_template":"{\"jsonrpc\":\"2.0\",\"method\":\"config_reset\",\"id\" : {{ (range(100000) | random) }}}"
}
},
"availability_topic":"gfplab\/gzcdev-000000000000\/online",
"payload_available":"ready",
"payload_not_available":"lost",
"state_topic":"gfplab\/gzcdev-000000000000\/state",
"command_topic":"gfplab\/gzcdev-000000000000\/rpc",
"qos":2
}
And this is the first entity:
As you could see, it displays - as entity_id - the value “binary_sensor.unnamed_device_33”. The same thing if i use the new “default_entity_id” or node.
Suggestions? We need predictable entity_id to be used inside our custom cards, and not such kind of names.
