Hi, i’m new to this forum, but i used it to find solutions already :).
But i can’t find answer to my issue.
I had integrated openwrt to HA via collectd and mqtt, values are coming properly (checked via mqtt browser in HA) but my value for template returns error:
ValueError: Template error: int got invalid input '41800000' when rendering template '{{ value.split(':')[1] | int }}' but no default was specified rendering template for entity 'sensor.linksys_mr8300_linksys_gora_cyphered_2_4g_bitrate', template: '{{ value.split(':')[1] | int }}', default value: default and payload: 1730819543.628:41800000
My template is as follows:
- name: linksys-gora Cyphered 2.4G Bitrate
state_topic: homeassistant/linksys-gora/iwinfo-phy1-ap0/bitrate
unit_of_measurement: Mbits
value_template: "{{ value.split(':')[1] | int }}"
unique_id: linksys-gora-iwinfo-phy1-bitrate
device:
identifiers: MR8300
name: Linksys MR8300
model: Linksys MR8300 (Dallas)
manufacturer: Linksys
Default value for int didn’t solve issue - i can’t figure it out how to do it.
In template editor it works - but when i put it to config.yaml it doesn’t.