Small tweaks (#32946)

This commit is contained in:
Daniel Shokouhi 2020-03-18 13:19:40 -07:00 committed by GitHub
parent 05abf37046
commit 661570dfad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 6 deletions

View file

@ -2,7 +2,7 @@
"domain": "obihai", "domain": "obihai",
"name": "Obihai", "name": "Obihai",
"documentation": "https://www.home-assistant.io/integrations/obihai", "documentation": "https://www.home-assistant.io/integrations/obihai",
"requirements": ["pyobihai==1.2.0"], "requirements": ["pyobihai==1.2.1"],
"dependencies": [], "dependencies": [],
"codeowners": ["@dshokouhi"] "codeowners": ["@dshokouhi"]
} }

View file

@ -59,8 +59,9 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
for key in services: for key in services:
sensors.append(ObihaiServiceSensors(pyobihai, serial, key)) sensors.append(ObihaiServiceSensors(pyobihai, serial, key))
for key in line_services: if line_services is not None:
sensors.append(ObihaiServiceSensors(pyobihai, serial, key)) for key in line_services:
sensors.append(ObihaiServiceSensors(pyobihai, serial, key))
for key in call_direction: for key in call_direction:
sensors.append(ObihaiServiceSensors(pyobihai, serial, key)) sensors.append(ObihaiServiceSensors(pyobihai, serial, key))
@ -136,8 +137,9 @@ class ObihaiServiceSensors(Entity):
services = self._pyobihai.get_line_state() services = self._pyobihai.get_line_state()
if self._service_name in services: if services is not None:
self._state = services.get(self._service_name) if self._service_name in services:
self._state = services.get(self._service_name)
call_direction = self._pyobihai.get_call_direction() call_direction = self._pyobihai.get_call_direction()

View file

@ -1432,7 +1432,7 @@ pynx584==0.4
pynzbgetapi==0.2.0 pynzbgetapi==0.2.0
# homeassistant.components.obihai # homeassistant.components.obihai
pyobihai==1.2.0 pyobihai==1.2.1
# homeassistant.components.ombi # homeassistant.components.ombi
pyombi==0.1.10 pyombi==0.1.10