Pyhass / Hive-Custom-Component

A custom version of the home assistant hive component
MIT License
33 stars 17 forks source link

Not creating entities for devices #131

Open timjcraig opened 2 years ago

timjcraig commented 2 years ago

Describe the bug

Hive integration authenticates successfully with 2FA and only installs the hub entity.

To Reproduce Steps to reproduce the behaviour:

Expected behaviour

Load all climate, switch and sensor entities for TRV's and thermostats

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context

I have removed integration, restarted HA and re-added the integration.

Log File

Logger: homeassistant.components.climate
Source: components/hive/__init__.py:150 
Integration: Climate ([documentation](https://www.home-assistant.io/integrations/climate), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+climate%22)) 
First occurred: 21:56:50 (1 occurrences) 
Last logged: 21:56:50

Error while setting up hive platform for climate
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 281, in _async_setup_platform
    await asyncio.shield(task)
  File "/usr/src/homeassistant/homeassistant/components/hive/climate.py", line 64, in async_setup_entry
    entities.append(HiveClimateEntity(hive, dev))
  File "/usr/src/homeassistant/homeassistant/components/hive/climate.py", line 113, in __init__
    super().__init__(hive_session, hive_device)
  File "/usr/src/homeassistant/homeassistant/components/hive/__init__.py", line 150, in __init__
    model=self.device["deviceData"]["model"],
KeyError: 'model'
Logger: homeassistant.components.sensor
Source: custom_components/hive/__init__.py:148 
Integration: Sensor ([documentation](https://www.home-assistant.io/integrations/sensor), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+sensor%22)) 
First occurred: 21:56:50 (1 occurrences) 
Last logged: 21:56:50

Error while setting up hive platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 281, in _async_setup_platform
    await asyncio.shield(task)
  File "/config/custom_components/hive/sensor.py", line 96, in async_setup_entry
    entities.append(HiveSensorEntity(hive, dev, description))
  File "/config/custom_components/hive/sensor.py", line 105, in __init__
    super().__init__(hive, hive_device)
  File "/config/custom_components/hive/__init__.py", line 148, in __init__
    model=self.device["deviceData"]["model"],
KeyError: 'model'
Logger: homeassistant.components.switch
Source: components/hive/__init__.py:150 
Integration: Switch ([documentation](https://www.home-assistant.io/integrations/switch), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+switch%22)) 
First occurred: 21:56:50 (1 occurrences) 
Last logged: 21:56:50

Error while setting up hive platform for switch
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 281, in _async_setup_platform
    await asyncio.shield(task)
  File "/usr/src/homeassistant/homeassistant/components/hive/switch.py", line 43, in async_setup_entry
    entities.append(HiveSwitch(hive, dev, description))
  File "/usr/src/homeassistant/homeassistant/components/hive/switch.py", line 52, in __init__
    super().__init__(hive, hive_device)
  File "/usr/src/homeassistant/homeassistant/components/hive/__init__.py", line 150, in __init__
    model=self.device["deviceData"]["model"],
KeyError: 'model'
andyclarke1978 commented 2 years ago

I am having the exact same issue, tried finding solution on every forum, I just get lost in all the jargon. Hope someone has an answer soon. The official integration finds the hub and thermostat but only pulls in battery state entity.

almost identical log file errors

woodhaus82 commented 1 year ago

Its a work around but I used this post to get all of my Hive devices in and to have the data being polled:

https://github.com/home-assistant/core/issues/80341#issuecomment-1344406213

andyclarke1978 commented 1 year ago

This worked... how have entities back but still no climate entity

Duff-Box1 commented 1 year ago

I have the same issue any timeframe for updating this integration?

My error logs are similar:

Logger: homeassistant.components.water_heater Source: components/hive/init.py:150 Integration: Water Heater (documentation, issues) First occurred: 31 December 2022, 17:08:24 (1 occurrences) Last logged: 31 December 2022, 17:08:24

Error while setting up hive platform for water_heater Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 281, in _async_setup_platform await asyncio.shield(task) File "/usr/src/homeassistant/homeassistant/components/hive/water_heater.py", line 54, in async_setup_entry entities.append(HiveWaterHeater(hive, dev)) File "/usr/src/homeassistant/homeassistant/components/hive/init.py", line 150, in init model=self.device["deviceData"]["model"], KeyError: 'model'

Logger: homeassistant.components.climate Source: components/hive/init.py:150 Integration: Climate (documentation, issues) First occurred: 31 December 2022, 17:08:24 (1 occurrences) Last logged: 31 December 2022, 17:08:24

Error while setting up hive platform for climate Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 281, in _async_setup_platform await asyncio.shield(task) File "/usr/src/homeassistant/homeassistant/components/hive/climate.py", line 64, in async_setup_entry entities.append(HiveClimateEntity(hive, dev)) File "/usr/src/homeassistant/homeassistant/components/hive/climate.py", line 113, in init super().init(hive_session, hive_device) File "/usr/src/homeassistant/homeassistant/components/hive/init.py", line 150, in init model=self.device["deviceData"]["model"], KeyError: 'model'