{"id":13305,"date":"2021-03-31T11:40:07","date_gmt":"2021-03-31T11:40:07","guid":{"rendered":"https:\/\/www.rjt.org.uk\/home\/?post_type=home_assistant_tip&#038;p=13305"},"modified":"2021-03-31T11:40:08","modified_gmt":"2021-03-31T11:40:08","slug":"change-type-of-zigbee-zha-entity","status":"publish","type":"home_assistant_tip","link":"https:\/\/www.rjt.org.uk\/home\/archives\/home-assistant-tip\/change-type-of-zigbee-zha-entity\/","title":{"rendered":"Change Type of Zigbee ZHA Entity"},"content":{"rendered":"\n<p>Sonoff zigbee devices can come in as the wrong type, depending on the use.<\/p>\n\n\n\n<p>To force a Switch to be a light in Configuration.yaml add<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">zha:\n  device_config:\n    00:12:4b:00:1b:79:7d:7b-1:    # format: {ieee}-{endpoint_id}\n      type: 'light'    <\/pre>\n\n\n\n<p>The ieee can be found on the device information and the endpoint will normally be 1 for simple switches.<\/p>\n\n\n\n<p>Restart HA and the entity will be recreated as the correct type and can be renamed and configured as normal.  Just use &#8220;switch&#8221; for switches and &#8220;light&#8221; for lights.<\/p>\n\n\n\n<p>Found on the ZHA Issues Page <a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/zigpy\/zha-device-handlers\/issues\/654\" data-type=\"URL\" data-id=\"https:\/\/github.com\/zigpy\/zha-device-handlers\/issues\/654\" target=\"_blank\">Issue 654<\/a><\/p>\n\n\n\n<p><\/p>\n","protected":false},"template":"","class_list":["post-13305","home_assistant_tip","type-home_assistant_tip","status-publish","hentry","comments-off"],"_links":{"self":[{"href":"https:\/\/www.rjt.org.uk\/home\/wp-json\/wp\/v2\/home_assistant_tip\/13305","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rjt.org.uk\/home\/wp-json\/wp\/v2\/home_assistant_tip"}],"about":[{"href":"https:\/\/www.rjt.org.uk\/home\/wp-json\/wp\/v2\/types\/home_assistant_tip"}],"wp:attachment":[{"href":"https:\/\/www.rjt.org.uk\/home\/wp-json\/wp\/v2\/media?parent=13305"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}