Hi,
I have these sensors defined in my configuration.yaml
mqtt:
sensor:
- name: rwg_tx_quota
unique_id: "tx_quota"
unit_of_measurement: "bit"
state_topic: "quota/tx"
- name: rwg_rx_quota
unique_id: "rx_quota"
unit_of_measurement: "bit"
state_topic: "quota/rx"
template:
- sensor:
- name: "rwg_total"
unit_of_measurement: "GByte"
state: >
{{ (((states('sensor.rwg_rx_quota')) | float + (states('sensor.rwg_tx_quota')) | float ) / 800000000) | round(3)}}
- name: "rwg_balance"
unit_of_measurement: "GByte"
state: >
{{ ((20.00 | float) - ((states('sensor.rwg_total')) | float)) | round(3) }}
The mqtt (rwg_tx_quota & rwg_rx_quota) update in real-time. However, the template sensors (rwg_total & rwg_balance) only seem to update on system restart.
I have tried adding update_interval: 60s, but that is reported as an error?
Logger: homeassistant.config
Source: config.py:592
First occurred: 09:11:44 (2 occurrences)
Last logged: 09:24:45
Invalid config for 'template' at configuration.yaml, line 44: 'update_interval' is an invalid option for 'template', check: sensor->0->update_interval
Any thoughts…
Regards, Martin