zachowj / hass-node-red

Companion Component for node-red-contrib-home-assistant-websocket to help integrate Node-RED with Home Assistant Core
MIT License
446 stars 180 forks source link

Button Entity Unknown and Won't Fire When Pressed #156

Closed shbatm closed 1 year ago

shbatm commented 1 year ago

Version of the custom_component

node-red-contrib-home-assistant-websocket: 0.47.0 Node-RED Companion: 1.1.2

Configuration


Add your logs here.

Describe the bug

Button entities will not fire and show as unknown in the Home Assistant UI. image image

Debug log


2022-11-17 06:13:49.720 INFO (MainThread) [custom_components.nodered.discovery] Creating button a2277b3b.64d0f8 a014613185b274bd
2022-11-17 06:13:49.722 ERROR (MainThread) [homeassistant.components.button] Platform nodered does not generate unique IDs. ID nodered-a2277b3b.64d0f8-a014613185b274bd already exists - ignoring button.test_button
2022-11-17 06:13:49.726 ERROR (MainThread) [homeassistant.components.button] Platform nodered does not generate unique IDs. ID nodered-a2277b3b.64d0f8-a014613185b274bd already exists - ignoring button.test_button
2022-11-17 06:27:54.989 DEBUG (MainThread) [custom_components.nodered.discovery] Discovery message: {'type': 'nodered/discovery', 'server_id': 'a2277b3b.64d0f8', 'node_id': 'a014613185b274bd', 'config': {'name': 'Test Button'}, 'component': 'button', 'device_info': {'id': '3dcef21744e4a874', 'hw_version': '1.0.0', 'name': 'Laundry Tracker', 'manufacturer': 'Node-RED', 'model': '1', 'sw_version': '1.0.0'}, 'id': 24468}
2022-11-17 06:27:54.989 INFO (MainThread) [custom_components.nodered.discovery] Creating button a2277b3b.64d0f8 a014613185b274bd
2022-11-17 06:27:55.232 ERROR (MainThread) [homeassistant.components.button] Platform nodered does not generate unique IDs. ID nodered-a2277b3b.64d0f8-a014613185b274bd already exists - ignoring button.test_button
2022-11-17 06:27:55.233 ERROR (MainThread) [homeassistant.components.button] Platform nodered does not generate unique IDs. ID nodered-a2277b3b.64d0f8-a014613185b274bd already exists - ignoring button.test_button
2022-11-17 06:27:55.234 ERROR (MainThread) [homeassistant.components.button] Platform nodered does not generate unique IDs. ID nodered-a2277b3b.64d0f8-a014613185b274bd already exists - ignoring button.test_button
2022-11-17 06:27:55.234 ERROR (MainThread) [homeassistant.components.button] Platform nodered does not generate unique IDs. ID nodered-a2277b3b.64d0f8-a014613185b274bd already exists - ignoring button.test_button

# When pressing button in UI:
2022-11-17 06:21:46.164 WARNING (MainThread) [homeassistant.helpers.service] Unable to find referenced entities button.test_button or it is/they are currently not available

# After a reload of the config entry:
2022-11-17 06:27:55.232 ERROR (MainThread) [homeassistant.components.button] Platform nodered does not generate unique IDs. ID nodered-a2277b3b.64d0f8-a014613185b274bd already exists - ignoring button.test_button
2022-11-17 06:27:55.233 ERROR (MainThread) [homeassistant.components.button] Platform nodered does not generate unique IDs. ID nodered-a2277b3b.64d0f8-a014613185b274bd already exists - ignoring button.test_button
2022-11-17 06:27:55.234 ERROR (MainThread) [homeassistant.components.button] Platform nodered does not generate unique IDs. ID nodered-a2277b3b.64d0f8-a014613185b274bd already exists - ignoring button.test_button
2022-11-17 06:27:55.234 ERROR (MainThread) [homeassistant.components.button] Platform nodered does not generate unique IDs. ID nodered-a2277b3b.64d0f8-a014613185b274bd already exists - ignoring button.test_button
shbatm commented 1 year ago

Restarted everything (server and add-ons) and seems to be working now.