mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Fix home coach discovery (#24902)
* Fix home coach discovery * Update requirements file
This commit is contained in:
parent
aa03550f6b
commit
e8d9fe0aa8
@ -3,7 +3,7 @@
|
||||
"name": "Netatmo",
|
||||
"documentation": "https://www.home-assistant.io/components/netatmo",
|
||||
"requirements": [
|
||||
"pyatmo==2.1.0"
|
||||
"pyatmo==2.1.1"
|
||||
],
|
||||
"dependencies": [
|
||||
"webhook"
|
||||
|
@ -149,7 +149,10 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||
# Test if manually configured
|
||||
if CONF_MODULES in config:
|
||||
module_items = config[CONF_MODULES].items()
|
||||
module_names = data.get_module_names()
|
||||
for module_name, monitored_conditions in module_items:
|
||||
if module_name not in module_names:
|
||||
continue
|
||||
for condition in monitored_conditions:
|
||||
dev.append(NetatmoSensor(
|
||||
data, module_name, condition.lower(),
|
||||
@ -527,6 +530,8 @@ class NetatmoData:
|
||||
|
||||
def get_module_names(self):
|
||||
"""Return all module available on the API as a list."""
|
||||
if self.station is not None:
|
||||
return self.station_data.modulesNamesList(station=self.station)
|
||||
return self.station_data.modulesNamesList()
|
||||
|
||||
def update(self):
|
||||
|
@ -1022,7 +1022,7 @@ pyalarmdotcom==0.3.2
|
||||
pyarlo==0.2.3
|
||||
|
||||
# homeassistant.components.netatmo
|
||||
pyatmo==2.1.0
|
||||
pyatmo==2.1.1
|
||||
|
||||
# homeassistant.components.apple_tv
|
||||
pyatv==0.3.12
|
||||
|
Loading…
x
Reference in New Issue
Block a user