I have the same issue
Hmm, I havenāt followed the latest developments on home assistant. But from the logs it looks as if they might have converted all components to asynchronous updates and stopped supporting the way I was using here.
When I implemented the component, I used the generic thermostat as template, so maybe you can have a look there and compare the versions. The basic protocol should probably still work. As I said I donāt have the thermostat anymore so itās difficult to debug for me.
I think you are pointing in the right direction. There are some changes, to start with the setup of the platform.
Iāve tried to deal with them but since Iām not a programmer itās mainly trial and error without knowing what Iām doing. Someone else working on it?
Iāve tried this:
@asyncio.coroutine
def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
"""Setup the e thermostat."""
name = config.get(CONF_NAME)
saving_temp = config.get(CONF_SAVING_TEMPERATURE)
away_temp = config.get(CONF_AWAY_TEMPERATURE)
comfort_temp = config.get(CONF_COMFORT_TEMPERATURE)
username = config.get(CONF_USERNAME)
password = config.get(CONF_PASSWORD)
yield from async_add_devices([EThermostaat(
name, username, password, saving_temp,
away_temp, comfort_temp)])
But getting the error:
2017-12-09 13:31:09 ERROR (MainThread) [homeassistant.components.climate] Error while setting up platform e_thermostaat
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_component.py", line 171, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=self.hass.loop)
File "/usr/lib/python3.6/asyncio/tasks.py", line 352, in wait_for
return fut.result()
File "/usr/lib/python3.6/asyncio/futures.py", line 244, in result
raise self._exception
File "/usr/lib/python3.6/asyncio/tasks.py", line 179, in _step
result = coro.send(None)
File "/config/custom_components/climate/e_thermostaat.py", line 84, in async_setup_platform
away_temp, comfort_temp)])
TypeError: 'NoneType' object is not iterable
2017-12-09 13:31:09 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/lib/python3.6/asyncio/tasks.py", line 179, in _step
result = coro.send(None)
File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_component.py", line 399, in async_process_entity
new_entity, self, update_before_add=update_before_add
File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_component.py", line 247, in async_add_entity
yield from entity.async_update_ha_state()
File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 231, in async_update_ha_state
attr)
File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 333, in _attr_setter
value = getattr(self, name)
File "/usr/lib/python3.6/site-packages/homeassistant/components/climate/__init__.py", line 736, in supported_features
raise NotImplementedError()
NotImplementedError
That issue is caused by this PR https://github.com/home-assistant/home-assistant/pull/10658.
I have updated the e-thermostaat custom component and itās working now on v0.59.2.
You can find this version here https://github.com/gerard33/home-assistant/blob/master/e_thermostaat.py.
I have justed changed it, so itās not quite tested yet.
I noticed the following:
- the Away switch has disappeared
- when choosing operation mode Comfort, the correct temperature is choosen (from configuratio.yaml), but operation is shown as Away
- when choosing operation mode Saving, the correct temperature is choosen, but operation is shown as Comfort
- the other 2 operations are looking good
Could you please also test it and let me know if you have the same. If so, I will try to fix that.
The away switch is probably gone, since you should enable āSUPPORT_AWAY_MODEā.
Regarding the away/comfort issue:
These values are rather arbitrarily.
I had better luck with these:
FIXED_TEMP = 160
COMFORT = 32
AWAY = 64
SAVING = 24
Good work!
Iāll update mine this afternoon to see if it works.
Before the update, the thermostat already falsely indicated the Away/Comfort mode.
It was also hopping between the two modes randomly, this could also be related.
Everyone left home during the example below.
Yeah the āmodeā number is probably some kind of ābit-codeā. It changes depending on the other settings of the thermostat. As I said before try changing the SAVING number to 24, that solved the issue for me when I still had the thermostaat. But it could be the same for AWAY and COMFORT, that you have to change the numbers a bit there.
You can add a debug statement
_LOGGER.debug("configuration number: {}".format(self._old_conf[0]))
here to see what number you are getting.
I match the number to the closest value and return the operation mode here:
But maybe the check should better be a range, i.e. number 0-31 is SAVING, 32-63 is COMFORT, 64-127 is AWAY and > 128 is FIXED_TEMP.
Thanks! Was already trying to change this values a bit based on some other Icy plugins on Github.
Will add your logger to see which values to use.
Appreciate your help, especially now you donāt have this thermostat anymore
Other question: in my latest version (which is not on Github yet) I have changed the Away mode to ālang-wegā and the Saving mode to ābespaarā as that makes more sense to me.
Any specific reason you had to link the ābespaarā mode to Away?
Great job for this fix. At my system itās working again. The away switch is shown at my place, and it seems the Away/Comfort mode are both working fine after the config suggestion of @daenny
What exact values did you use?
I managed to retrieve the āaway modeā by adding the suggested code, but Iām not sure what values to change to fix the Away/Comfort settings.
I currently have:
# Personal settings in e-thermostaat.nl
DEFAULT_SAVING_TEMPERATURE = 15
DEFAULT_AWAY_TEMPERATURE = 12
DEFAULT_COMFORT_TEMPERATURE = 18.5
And
# Values reverse engineered for settings
FIXED_TEMP = 160
COMFORT = 32
AWAY = 64
SAVING = 0
Should I match the āreversed engineeredā settings to my preferences, or are they used elsewhere?
Sorry, Iām not that familiar with Python
Thanks!
Thanks for your suggestion! I have implemented this in a new version which is available here home-assistant-archive/e_thermostaat.py at master Ā· gerard33/home-assistant-archive Ā· GitHub.
With the previous method I had a value of 60 for the Comfort state, which however was mapped to the Saving state, but with the new method this is now mapped correctly.
@sharki and others, if you want to use this version, there are some changes you need to take into consideration:
- Changed the way operation mode is checked to get better results
- Away mode is back again, and only applies to AWAY state, not to SAVING state anymore
- Mapped Away mode to ālang-wegā and the Saving mode to ābespaarā
- Changed operation modes visible in frontend to Dutch names ā if you want the English text change these lines home-assistant-archive/e_thermostaat.py at master Ā· gerard33/home-assistant-archive Ā· GitHub
Your configuration.yaml could look like this:
# E-Thermostaat Icy
climate:
- platform: e_thermostaat
username: !secret icy_username
password: !secret icy_password
comfort_temperature: 18.5
saving_temperature: 15
away_temperature: 12
Great work on the code!
The issue remains the same, the only two options my GUI can display is the āvaste temperatuurā (fixed temperature) or ābespaarstandā (savings mode). Both comfort and ālang-wegā directly jump to ābespaarā after setting them.
The int to operation mode you wrote does look like it should have solved that. I have no idea where it goes wrong. After adding the debug line mentioned by daenny it complains that āselfā is non-existing.
That is strange as all four options are working here.
Did you copy my complete code? Because I have made a lot of changes, also again to these values
# Values reverse engineered for settings
COMFORT = 32
SAVING = 64
AWAY = 0
FIXED_TEMP = 128
And what I did to easily track the values of the thermostat, I changed
_LOGGER.debug("E-Thermostaat configuration number: {}".format(self._old_conf[0]))
to
_LOGGER.error("E-Thermostaat configuration number: {}".format(self._old_conf[0]))
so that the values are shown in the log, without needing to change the logger component.
Thanks for the quick replies!
Yes, I copied the whole code. Iāll try later if changing the default temperatures (those I did change slightly) solves the problem.
Edit:
@gerard33 After using your code without alterations it works perfectly.
Thanks again!
Hi Guys,
I am new to home assistant and wanted to add this script to read and control my ICY Thermostat.
It loads the component but gives the error:
Config validating
Config error. See dev-info panel for details.
If i look in the dev log i only can see:
starting version 3.2.4
Testing configuration at /config
2018-02-09 21:51:42 ERROR (MainThread) [homeassistant.bootstrap] Unable to setup error log /config/home-assistant.log (access denied)
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setting up recorder
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setting up http
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setup of domain recorder took 0.0 seconds.
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setup of domain http took 0.0 seconds.
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setting up history
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setting up websocket_api
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setting up api
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setting up system_log
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setup of domain history took 0.0 seconds.
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setup of domain websocket_api took 0.0 seconds.
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setup of domain api took 0.0 seconds.
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setup of domain system_log took 0.0 seconds.
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setting up frontend
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setup of domain frontend took 0.0 seconds.
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setting up updater
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setting up discovery
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setting up map
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setting up sun
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setting up group
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setting up sensor
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setting up climate
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setup of domain updater took 0.4 seconds.
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setup of domain discovery took 0.4 seconds.
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setup of domain map took 0.4 seconds.
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setup of domain sun took 0.4 seconds.
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setup of domain group took 0.4 seconds.
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setup of domain sensor took 0.1 seconds.
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setup of domain climate took 0.0 seconds.
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setting up conversation
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setting up logbook
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setting up tts
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setting up config
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setting up cloud
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setting up panel_iframe
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setup of domain conversation took 0.0 seconds.
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setup of domain logbook took 0.0 seconds.
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setup of domain tts took 0.0 seconds.
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setting up automation
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setting up script
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setup of domain config took 0.0 seconds.
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setup of domain cloud took 0.0 seconds.
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setup of domain panel_iframe took 0.0 seconds.
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setup of domain automation took 0.0 seconds.
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setup of domain script took 0.0 seconds.
Can someone please help me?
Thanks in advance.
Just added the custom component by creating a file called : e_thermostaat.py in directory /config/custom_component/climate/
Latest code can be retrieved from :
Added the following in configuration.yaml :
climate:
- platform: e_thermostaat
username: !secret icy_username
password: !secret icy_password
comfort_temperature: 20
saving_temperature: 15
away_temperature: 12
Et voila, I just added a thermostat to my Hass.io setup.
I can confirm this custom component works on version : v0.81.2
Anyone else having trouble controlling this component through Google Assistant via Nabu Casa?
I could control the thermostat through google assistant before a while ago. Iām not sure what changed. I tried updating my e_thermostaat.py, no go unfortunately.
The thermostat shows up in my google home app, but it cannot be controlled.
If I try to control it by voice (Hey Google, set the thermostat to 20 degrees), the response is: āThat mode isnāt available for {{name}}ā.
Any ideas?
I donāt use Nabu Casa but I have the same problem.
Hi there,
Iām pretty new with this. Does this also still work on 0.82.1. I donāt get it to work. I donāt know what I have done wrong.
Thanks in advance
Ivo Frenken