Hi,
how can I avoid this error:
Jul 03 09:21:00 tower hass[11827]: ERROR:homeassistant.helpers.template:Error parsing value: list object has no element 1 (value: 'NoneType' object has no attribute 'registers', template: {{float(value.split ('=')[1]) / 60 / 24}})
The sensor is not yet available after startup because it gets filled by a script that calls data via ModBus. So I’ll need something like a “try catch” thingy.
- platform: command_line
name: Filter change remaining time
value_template: "{{float(value.split ('=')[1]) / 60 / 24}}"
command: '/home/homeassistant/.homeassistant/helios/helios.py helios.fritz.box 10 v01033'
And, second question: how can I format the result to two decimals. Currently the value can get quite long based on the result of the division.
Thanks!