Skip to content

Commit

Permalink
fix up light class
Browse files Browse the repository at this point in the history
  • Loading branch information
scottyphillips committed Sep 15, 2021
1 parent 3268869 commit bf6cbe4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions custom_components/echonetlite/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ async def async_setup_entry(hass, config_entry, async_add_devices):
"""Set up entry."""
entities = []
for entity in hass.data[DOMAIN][config_entry.entry_id]:
_LOGGER.debug("Found ECHONET Light")
if entity['instance']['eojgc'] == 0x02 and entity['instance']['eojcc'] == 0x90 : #General Lighting
entities.append(EchonetLight(config_entry.title, entity['echonetlite']))
async_add_devices(entities, True)
Expand Down Expand Up @@ -80,7 +81,7 @@ def device_info(self):
"identifiers": {
(DOMAIN, self._connector._uid, self._connector._instance._eojgc, self._connector._instance._eojcc, self._connector._instance._eojci)
},
"name": self._device_name,
"name": self._name,
"manufacturer": self._connector._manufacturer
#"model": "",
#"sw_version": "",
Expand All @@ -101,7 +102,7 @@ def is_on(self):
"""Return true if the device is on."""
return True if self._connector._update_data[ENL_STATUS] == "On" else False

async def async_turn_on(self, kwargs):
async def async_turn_on(self, **kwargs):
"""Turn on."""
await self._connector._instance.on()

Expand Down

0 comments on commit bf6cbe4

Please sign in to comment.