Error doing job: Task exception was never retrieved
8:33 PM components/climate/generic_thermostat.py (ERROR)
The behavior is that the Climate panel is not displayed until the heat sensor detects a temperature change. This happens after restarting HA or plugging in, Raspberry PI. I use Hasbian with Raspberry PI Zero W, and HA 0.62.1. In other version (0.59) I did not have such a problem.
The sensor is ds18b20
climate:
- platform: generic_thermostat
name: AC Birou
heater: switch.k23
target_sensor: sensor.birou_temperature
min_temp: 19
max_temp: 25
ac_mode: on
target_temp: 25
tolerance: 0.3
Changed to this with no effect;
climate:
- platform: generic_thermostat
name: AC Birou
heater: switch.k23
target_sensor: sensor.birou_temperature
min_temp: 19
max_temp: 25
ac_mode: on
target_temp: 25
cold_tolerance: 0.3
hot_tolerance: 0
@costaraculios could you join discord for a troubleshooting session? I don't really understand which panel is not visible. I've tested with broken sensors, with Aqara sensors with input and template sensors and never had a panel not displayed.
I attached the print screen.
I think the behaviour is related to a different PR (https://github.com/home-assistant/home-assistant/pull/11479)
Currently your behaviour would only be explained by the dependencies loading slow. Generic thermostat depends on: DEPENDENCIES = ['switch', 'sensor']
Can you try and use a mock sensor and see if behaviour changes?
sensor:
- platform: template
sensors:
temperature_158d0001030300:
unit_of_measurement: '°C'
value_template: "{{ states.input_number.slider1.state }}"
input_number:
slider1:
mode: box
initial: 22
step: 0.5
min: 16
max: 27
Pointing Generic Thermostat to this sensor makes the problem disappears.
But how to solve it with my sensor?
climate:
- platform: generic_thermostat
name: AC Birou
heater: switch.k23
target_sensor: sensor.temperature_158d0001030300
min_temp: 19
max_temp: 25
ac_mode: on
target_temp: 25
cold_tolerance: 0.3
hot_tolerance: 0
Can you post the config for your sensor? Maybe helps if we identify the platform for it. Also please use three ` before and after your config blocks to keep correct formatting.
sensor:
- platform: onewire
names:
28-031700f6c4ff: Living
28-031700e626ff: Dormitor
28-0316b5c0a1ff: Birou
28-0416c1527eff: Bucătarie
climate:
- platform: generic_thermostat
name: AC Birou
heater: switch.k23
target_sensor: sensor.temperature_158d0001030300
min_temp: 19
max_temp: 25
ac_mode: on
target_temp: 25
cold_tolerance: 0.3
hot_tolerance: 0
- platform: generic_thermostat
name: AC Living
heater: switch.k24
target_sensor: sensor.temperature_158d0001030300
min_temp: 19
max_temp: 25
ac_mode: on
target_temp: 25
cold_tolerance: 0.3
hot_tolerance: 0
- platform: generic_thermostat
name: Termostat Bucatarie
heater: switch.k25
target_sensor: sensor.temperature_158d0001030300
min_temp: 19
max_temp: 25
target_temp: 22.5
hot_tolerance: 0.3
cold_tolerance: 0
- platform: generic_thermostat
name: Termostat Living
heater: switch.k26
target_sensor: sensor.temperature_158d0001030300
min_temp: 19
max_temp: 25
target_temp: 22.5
hot_tolerance: 0.3
cold_tolerance: 0
I'll check and see if there is anything in onewire that could trigger the behaviour
Offtopic: It's three `, you used just one. Check "Preview" tab to see format result before posting.
I'm going to bed now, tomorrow I'm going to work. Here is 00: 16.Thank you for helping me.
..today, in fact...
@costaraculios we're from same country, same timezone :-) I'll think of more tests to narrow down the problem.
Tare, merci.
Do you have recorder: enabled?
I don't have enabled recorder.
Can you please try to enable recorder and see how it behaves?
On Thu, Feb 1, 2018 at 7:29 PM costaraculios notifications@github.com
wrote:
I don't have enabled recorder.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/home-assistant/home-assistant/issues/12095#issuecomment-362341164,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AHYSwBVYGnwAHa-gbCUQUx4vJeMpBwNoks5tQfSQgaJpZM4R0ij6
.
# I'm not an experienced user, so I enabled recorder like this.
recorder:
include:
domains:
- sensor
- switch
I deactivated everything in HA leaving only the generic thermostat, sensors and switchies for the thermostat. The behavior has not changed
This is the error .
2018-02-01 18:30:19 WARNING (MainThread) [homeassistant.bootstrap] Python 3.4 support has been deprecated and will be removed in the beginning of 2018. Please upgrade Python or your operating system. More info: https://home-assistant.io/blog/2017/10/06/deprecating-python-3.4-support/
2018-02-01 18:30:31 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/lib/python3.4/asyncio/tasks.py", line 237, in _step
result = next(coro)
File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 427, in _async_add_entity
yield from entity.async_added_to_hass()
File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/climate/generic_thermostat.py", line 169, in async_added_to_hass
if old_state.attributes[ATTR_AWAY_MODE] is not None:
KeyError: 'away_mode'
2018-02-01 18:30:31 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/lib/python3.4/asyncio/tasks.py", line 235, in _step
result = coro.send(value)
File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 427, in _async_add_entity
yield from entity.async_added_to_hass()
File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/climate/generic_thermostat.py", line 169, in async_added_to_hass
if old_state.attributes[ATTR_AWAY_MODE] is not None:
KeyError: 'away_mode'
2018-02-01 18:30:31 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/lib/python3.4/asyncio/tasks.py", line 235, in _step
result = coro.send(value)
File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 427, in _async_add_entity
yield from entity.async_added_to_hass()
File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/climate/generic_thermostat.py", line 169, in async_added_to_hass
if old_state.attributes[ATTR_AWAY_MODE] is not None:
KeyError: 'away_mode'
2018-02-01 18:30:31 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/lib/python3.4/asyncio/tasks.py", line 235, in _step
result = coro.send(value)
File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 427, in _async_add_entity
yield from entity.async_added_to_hass()
File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/climate/generic_thermostat.py", line 169, in async_added_to_hass
if old_state.attributes[ATTR_AWAY_MODE] is not None:
KeyError: 'away_mode'
That error should not influence your setup (the way it starts). Try to update your config to:
- platform: generic_thermostat
name: Termostat Living
heater: switch.k26
target_sensor: sensor.temperature_158d0001030300
min_temp: 19
max_temp: 25
target_temp: 22.5
hot_tolerance: 0.3
cold_tolerance: 0
away_temp: 19
And use once the away button on the thermostats. I will try to submit a PR specific to this error, but this would not fix your delayed init. If you want you can try the patch using custom_components on your current setup.
Update:
Yes that did the trick "away_temp:". Is not thist optional in generic thermostat?
I restarted HA several times to make sure. No problemo.
@costaraculios you mean that adding away_temp fixed the delayed display of the panel?
Yes.
Now I will reactivate the other settings to see how they react.
Yes, it works as it should. Thanks for assisting me.
Multumesc mult de ajutor. Datorez o bere :).
Please close the issue if you are happy with the fix provided.
Most helpful comment
Now I will reactivate the other settings to see how they react.