Drayton Wiser Home Assistant Integration

Hi, everyone!

I’m new to Home Assistant and wiser. At the moment I have one Wiser hub and one trv.
I run Home Assistant core (0.117.0) on Proxmox VM, created from official VM disk image. I tried to update to latest version, because i had the same problem on previos too.

I installed Wiser Integrations with HACS (1.6.1). I tried Wiser integrations 2.4 beta1 and 2.3.1 but entities:
sensor.wiser_heathub;
climate.wiser_{wiser_room_name}
is unavailable. So I can’t use them.

Wiser Hub Firmware version: 2.24.11
Wiser App version: 3.11.0 (build 19)

In logs I have those errors:

Logger: homeassistant.util.logging
Source: util/logging.py:108
First occurred: 1:06:09 AM (94 occurrences)
Last logged: 1:29:09 AM

* Exception in async_update_state when dispatching 'WiserHubUpdateMessage': () Traceback (most recent call last): File "/config/custom_components/wiser/sensor.py", line 158, in async_update_state await self.async_update_ha_state(True) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 283, in async_update_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 323, in _async_write_ha_state attr.update(self.device_state_attributes or {}) File "/config/custom_components/wiser/sensor.py", line 395, in device_state_attributes self.data.wiserhub.getHubData() AttributeError: 'NoneType' object has no attribute 'get'
* Exception in async_update_state when dispatching 'WiserHubUpdateMessage': () Traceback (most recent call last): File "/config/custom_components/wiser/climate.py", line 590, in async_update_state await self.async_update_ha_state(True) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 283, in async_update_ha_state self._async_write_ha_state() File 
"/usr/src/homeassistant/homeassistant/helpers/entity.py", line 322, in _async_write_ha_state attr.update(self.state_attributes or {}) File "/config/custom_components/wiser/climate.py", line 490, in state_attributes attrs = super().state_attributes File 
"/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 262, in state_attributes data[ATTR_PRESET_MODE] = self.preset_mode File "/config/custom_components/wiser/climate.py", line 406, in preset_mode and wiser_preset.lower() == "frommanualoverride" AttributeError: 'NoneType' object has no attribute 'lower'
logger: homeassistant.components.climate
Source: custom_components/wiser/climate.py:406
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: 1:05:39 AM (2 occurrences)
Last logged: 1:05:39 AM

* Error adding entities for domain climate with platform wiser
* Error while setting up wiser platform for climate

Traceback (most recent call last): File 
"/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 314, in async_add_entities await asyncio.gather(*tasks) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 505, in _async_add_entity await entity.add_to_platform_finish() File 
"/usr/src/homeassistant/homeassistant/helpers/entity.py", line 531, in add_to_platform_finish self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 296, in async_write_ha_state self._async_write_ha_state() File 
"/usr/src/homeassistant/homeassistant/helpers/entity.py", line 322, in _async_write_ha_state attr.update(self.state_attributes or {}) File "/config/custom_components/wiser/climate.py", line 490, in state_attributes attrs = super().state_attributes File 
"/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 262, in state_attributes data[ATTR_PRESET_MODE] = self.preset_mode File "/config/custom_components/wiser/climate.py", line 406, in preset_mode and wiser_preset.lower() == "frommanualoverride" AttributeError: 'NoneType' object has no attribute 'lower'
Logger: homeassistant.components.switch
Source: components/switch/__init__.py:123
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: 1:05:39 AM (2 occurrences)
Last logged: 1:05:39 AM

* SwitchDevice is deprecated, modify WiserSwitch to extend SwitchEntity
* SwitchDevice is deprecated, modify WiserSmartPlug to extend SwitchEntity
Logger: homeassistant.components.climate
Source: components/climate/__init__.py:553
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: 1:05:39 AM (1 occurrences)
Last logged: 1:05:39 AM

ClimateDevice is deprecated, modify WiserRoom to extend ClimateEntity
Logger: homeassistant.components.sensor
Source: custom_components/wiser/sensor.py:395
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: 1:05:39 AM (2 occurrences)
Last logged: 1:05:39 AM

* Error adding entities for domain sensor with platform wiser
* Error while setting up wiser platform for sensor

Traceback (most recent call last): File 
"/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 314, in async_add_entities await asyncio.gather(*tasks) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 505, in _async_add_entity await entity.add_to_platform_finish() File 
"/usr/src/homeassistant/homeassistant/helpers/entity.py", line 531, in add_to_platform_finish self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 296, in async_write_ha_state self._async_write_ha_state() File 
"/usr/src/homeassistant/homeassistant/helpers/entity.py", line 323, in _async_write_ha_state attr.update(self.device_state_attributes or {}) File "/config/custom_components/wiser/sensor.py", line 395, in device_state_attributes self.data.wiserhub.getHubData() AttributeError: 'NoneType' object has no attribute 'get'
Logger: homeassistant.util.async_
Source: util/async_.py:105
First occurred: 1:05:39 AM (2 occurrences)
Last logged: 1:05:39 AM

Detected I/O inside the event loop. This is causing stability issues. Please report issue to the custom component author for wiser doing I/O at custom_components/wiser/config_flow.py, line 67: self.wiserhub = wiserHub(ip, secret)
Logger: homeassistant.loader
Source: loader.py:463
First occurred: 1:04:16 AM (1 occurrences)
Last logged: 1:04:16 AM

You are using a custom integration for wiser which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant.

Any suggestions? Can you please help me?

Hi All

first of all, thanks very much Angelo for developing this integration!

I am having some issues with installation. I have visibility of my HeatHub and this part of the integration seems to be working fine.

I also have a room thermostat, but its entities are showing as unavailable in home assistant, like below:

I have tried multiple versions and have experienced the same issue (2.4beta1, 2.3, master) all installed from HACS. Maybe it is something straightforward that I haven’t set up correctly… Any support would be much appreciated!

In the log I can see the below:

Logger: homeassistant.util.logging
Source: util/logging.py:108
First occurred: 3:48:21 PM (22 occurrences)
Last logged: 3:56:53 PM

Exception in async_update_state when dispatching 'WiserHubUpdateMessage': () Traceback (most recent call last): File "/config/custom_components/wiser/climate.py", line 559, in async_update_state await self.async_update_ha_state(True) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 283, in async_update_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 322, in _async_write_ha_state attr.update(self.state_attributes or {}) File "/config/custom_components/wiser/climate.py", line 456, in state_attributes attrs = super().state_attributes File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 262, in state_attributes data[ATTR_PRESET_MODE] = self.preset_mode File "/config/custom_components/wiser/climate.py", line 393, in preset_mode preset = WISER_PRESET_TO_HASS[wiser_preset.lower()] AttributeError: 'NoneType' object has no attribute 'lower'
Exception in async_update_state when dispatching 'WiserHubUpdateMessage': () Traceback (most recent call last): File "/config/custom_components/wiser/sensor.py", line 141, in async_update_state await self.async_update_ha_state(True) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 283, in async_update_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 323, in _async_write_ha_state attr.update(self.device_state_attributes or {}) File "/config/custom_components/wiser/sensor.py", line 367, in device_state_attributes self.data.wiserhub.getHubData().get("Zigbee").get("NetworkChannel") AttributeError: 'NoneType' object has no attribute 'get'
Logger: homeassistant.components.websocket_api.http.connection.2910383192
Source: custom_components/wiser/climate.py:393
Integration: Home Assistant WebSocket API ([documentation](https://www.home-assistant.io/integrations/websocket_api), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+websocket_api%22))
First occurred: 3:48:21 PM (2 occurrences)
Last logged: 3:48:26 PM

'NoneType' object has no attribute 'lower'

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 135, in handle_call_service await hass.services.async_call( File "/usr/src/homeassistant/homeassistant/core.py", line 1448, in async_call task.result() File "/usr/src/homeassistant/homeassistant/core.py", line 1483, in _execute_service await handler.job.target(service_call) File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service await self.hass.helpers.service.entity_service_call( File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 482, in entity_service_call future.result() # pop exception if have File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 664, in async_request_call await coro File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 519, in _handle_entity_call await result File "/config/custom_components/wiser/climate.py", line 372, in async_set_hvac_mode await self.set_room_mode(self.room_id, hvac_mode) File "/config/custom_components/wiser/climate.py", line 524, in set_room_mode await self.async_update_ha_state(True) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 283, in async_update_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 322, in _async_write_ha_state attr.update(self.state_attributes or {}) File "/config/custom_components/wiser/climate.py", line 456, in state_attributes attrs = super().state_attributes File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 262, in state_attributes data[ATTR_PRESET_MODE] = self.preset_mode File "/config/custom_components/wiser/climate.py", line 393, in preset_mode preset = WISER_PRESET_TO_HASS[wiser_preset.lower()] AttributeError: 'NoneType' object has no attribute 'lower'
Logger: homeassistant.components.climate
Source: custom_components/wiser/climate.py:388
Integration: Climate (documentation, issues)
First occurred: 3:47:54 PM (2 occurrences)
Last logged: 3:47:54 PM

Error adding entities for domain climate with platform wiser
Error while setting up wiser platform for climate
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 314, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 505, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 531, in add_to_platform_finish
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 296, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 322, in _async_write_ha_state
    attr.update(self.state_attributes or {})
  File "/config/custom_components/wiser/climate.py", line 456, in state_attributes
    attrs = super().state_attributes
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 262, in state_attributes
    data[ATTR_PRESET_MODE] = self.preset_mode
  File "/config/custom_components/wiser/climate.py", line 388, in preset_mode
    and wiser_preset.lower() == "frommanualoverride"
AttributeError: 'NoneType' object has no attribute 'lower'
Logger: homeassistant.components.sensor
Source: custom_components/wiser/sensor.py:367
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: 3:47:54 PM (2 occurrences)
Last logged: 3:47:54 PM

* Error adding entities for domain sensor with platform wiser
* Error while setting up wiser platform for sensor

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 314, in async_add_entities await asyncio.gather(*tasks) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 505, in _async_add_entity await entity.add_to_platform_finish() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 531, in add_to_platform_finish self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 296, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 323, in _async_write_ha_state attr.update(self.device_state_attributes or {}) File "/config/custom_components/wiser/sensor.py", line 367, in device_state_attributes self.data.wiserhub.getHubData().get("Zigbee").get("NetworkChannel") AttributeError: 'NoneType' object has no attribute 'get'

Hi all

Just to add to the above, interestingly I can see some entities from the thermostat in question, just not the temperature or switches. See below:

ooo this is a new bug, please log one on github issues and I’ll try and look at it…

I havent upgraded my HA instance for a while so may be a HA change… (baby etc)

new bugs, I need to get my act in order to look at it… please file a github issue and I’ll try and look at it…

@msp1974 Do you have any time?

Yes i’ll have a look later. Does this class as baby sitting duty? :slight_smile:

I finally get around to replying…

YES, the baby looks fine in your hands :slight_smile:

Just got all my Wiser kit and looking forward to setting it up at the weekend.

Looks like the integration is very thorough so well done there!

I do have one question, how is the integration with the hub working? - Is this over wifi direct to the hub, or via some cloud route ?
Is it something that turns into cat + mouse with wiser software updates, or fairly stable?

Thanks!

Thanks we (myself and @msp1974) worked hard on it…

The connection to the hub is via boring old WIFI + REST API, so yes if the cloud is down it still works fine :slight_smile:

Is it something that turns into cat + mouse with wiser software updates, or fairly stable?
So far really stable… Wiser have decided it isnt broken so they arent fixing it :slight_smile:

Ive been speaking to Mark about breaking it apart and releasing it as a native HA component… it will need to be released piecemeal to get through the process… sigh…

Thanks for the info, sounds great :smiley:

I don’t have my hub fitted yet as it needs rewiring from my old setup, but I’ll definitely be using this once it’s hooked up!

I have a door sensor on my kitchen door, If that door is left open for more than 10 minutes I want to turn my TRV in the hallway off. I can’t see a way to do that through the integration, is there a way? Or should I just send a “message” to Alexa to control it that way.

Within HA set up a automation which sets the trv to manual temp, say 10C. That would turn it off.
When the door is opened again, set it back to auto

The TRVs are supposed to have “open window” functionality, … never tried it really but I read somewhere it doesnt work

I wondered if you could use climate turn off?

Ie turn off radiator
domain is climate
service is turn_off
entity is climate.wiser_hallway

open window woudn’t work as its a door at the other end of the kitchen, its more that the cold starts to make its way round the house if the door is left open for the dogs

easy to test ,

Ho everyone! Love this intergration, it’s absoutely spot on. However moved house recently and set up a new drayton wiser and seem to have been getting this error recently

Logger: custom_components.wiser.const
Source: custom_components/wiser/__init__.py:229
Integration: Wiser Heating Component for Home Assistant ([documentation](https://www.home-assistant.io/integrations/wiser))
First occurred: 20 December 2020, 06:58:20 (27 occurrences)
Last logged: 05:05:28

Unable to update from Wiser hub due to unknown error

Just wondered if it made sense to anyone!

Can you check the homeassistant log files? I bet there is an massive stacktrace there… Log an issue on github and I’ll look at it today/tomorrow

Many thanks for the reply.
I noticed after that HACS had an issue and needed me to clear my browser cache, so have done that and restarted. So far, no more errors since the last one this morning. If it pops up again, I shall post over on github.

Thanks again :smiley:

Awesome, thats what we like to see. Myself and Mark (@msp1974 ) are going to revisit publishing this on HA as a native component. … … So any feedback welcome.

Hello, I am at my first experience with HA and loving the fact I can control my Wiser thanks to this integration
I’d like to add also the schedule in HA. I’ve successfully called the get_schedule service and saved the schedule configuration file. How can I add it in Lovelace?
Thanks for your help