diff --git a/custom_components/tahoma/__init__.py b/custom_components/tahoma/__init__.py index 19873d963..56fec7f51 100644 --- a/custom_components/tahoma/__init__.py +++ b/custom_components/tahoma/__init__.py @@ -32,6 +32,7 @@ DEFAULT_HUB, DEFAULT_UPDATE_INTERVAL, DOMAIN, + HUB_MANUFACTURER, IGNORED_TAHOMA_TYPES, SUPPORTED_ENDPOINTS, TAHOMA_TYPES, @@ -194,17 +195,18 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry): if isinstance(gateway.sub_type, Enum) else None ) + gateway_name = ( f"{beautify_name(gateway.type.name)} hub" if isinstance(gateway.type, Enum) - else None + else gateway.type ) device_registry.async_get_or_create( config_entry_id=entry.entry_id, identifiers={(DOMAIN, gateway.id)}, model=gateway_model, - manufacturer="Somfy", + manufacturer=HUB_MANUFACTURER[hub], name=gateway_name, sw_version=gateway.connectivity.protocol_version, ) diff --git a/custom_components/tahoma/const.py b/custom_components/tahoma/const.py index 5894aad67..c2e32932e 100644 --- a/custom_components/tahoma/const.py +++ b/custom_components/tahoma/const.py @@ -23,6 +23,16 @@ "Somfy TaHoma": "https://tahomalink.com/enduser-mobile-web/enduserAPI/", } +HUB_MANUFACTURER = { + "Cozytouch": "Cozytouch", + "eedomus": "eedomus", + "Hi Kumo": "Hitachi", + "Rexel Energeasy Connect": "Rexel", + "Somfy Connexoon IO": "Somfy", + "Somfy Connexoon RTS": "Somfy", + "Somfy TaHoma": "Somfy", +} + MIN_UPDATE_INTERVAL = 30 DEFAULT_UPDATE_INTERVAL = 30 diff --git a/custom_components/tahoma/manifest.json b/custom_components/tahoma/manifest.json index e4fe111a9..c0ec690d7 100644 --- a/custom_components/tahoma/manifest.json +++ b/custom_components/tahoma/manifest.json @@ -4,7 +4,7 @@ "config_flow": true, "documentation": "https://www.home-assistant.io/integrations/tahoma", "requirements": [ - "pyhoma==0.5.7" + "pyhoma==0.5.8" ], "codeowners": [ "@philklei", diff --git a/requirements.test.txt b/requirements.test.txt index 53ac6f1e6..dfb7aa142 100644 --- a/requirements.test.txt +++ b/requirements.test.txt @@ -7,4 +7,4 @@ pytest-cov<3.0.0 pytest-homeassistant # from our manifest.json for our Custom Component -pyhoma==0.5.7 +pyhoma==0.5.8