I have just come back from being away and upgraded to 0.80.3 (from 0.79.x I think).
I am now getting the error shown below many tens of times after a re-start which I wasn’t getting before I went away. I don’t know if this is related to the upgrade but I have not made any changes to the relevant bits of my config for many months.
The errors all relate to sensors of the form sensor.zoneX_time_today
which are all templated on sensor.zoneX_time
. (X is a number from one to five)
They appear precisely once each in my config as shown.
Any help greatly appreciated.
sensor:
- platform: template
sensors:
zone5_time_today:
friendly_name: Zone 5 total watering time today
value_template: >
{% set duration = states('sensor.zone5_time') %}
{{ (float(duration) * 60) | round }}
unit_of_measurement: minutes
icon_template: mdi:water
and
- platform: history_stats
name: zone5_time
entity_id: switch.zone5_valve
state: 'on'
type: time
start: '{{ now().replace(hour=0).replace(minute=0).replace(second=0) }}'
end: '{{ now() }}'
Log Details (ERROR)
Wed Oct 24 2018 11:58:45 GMT+0100 (British Summer Time)
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 310, in async_update_ha_state
self.entity_id, state, attr, self.force_update, self._context)
File "/usr/local/lib/python3.6/site-packages/homeassistant/core.py", line 903, in async_set
context)
File "/usr/local/lib/python3.6/site-packages/homeassistant/core.py", line 673, in __init__
"State max length is 255 characters.").format(entity_id))
homeassistant.exceptions.InvalidStateError: Invalid state encountered for entity id: sensor.zone5_time_today. State max length is 255 characters.