dMopp
(dMopp)
1
Hi, iam migrating my setup to the new syntax and iam almost done, but i have troubles with the following old sensors:
###Force InfluxDB Data-Update
- platform: template
sensors:
strompreis_influxdb:
unit_of_measurement: "EUR/kWh"
value_template: "{{ states('input_number.strompreis') }}"
unique_id: strompreis_influxdb
friendly_name: "Strompreis"
attribute_templates:
update_now: "{{ (now().minute / 50) | round(0) }}"
- platform: template
sensors:
einspeiseverguetung_influxdb:
unit_of_measurement: "EUR/kWh"
value_template: "{{ states('input_number.einspeiseverguetung') }}"
unique_id: einspeiseverguetung_influxdb
friendly_name: "Einspeiseverguetung"
attribute_templates:
update_now: "{{ (now().minute / 50) | round(0) }}"
Howto migrate them to the template: - sensor: Schema ?
123
(Taras)
2
What in the configuration of those two sensors is giving you trouble? How do they differ from the ones you have already converted?
dMopp
(dMopp)
3
uuuhm, the problem was just that i was to stupid for the documentation…
- sensor:
- name: "Strompreis InfluxDB"
unit_of_measurement: "EUR/kWh"
state: "{{ states('input_number.strompreis') }}"
unique_id: strompreis_influxdb
# friendly_name: "Strompreis"
attributes:
update_now: "{{ (now().minute / 50) | round(0) }}"
- sensor:
- name: "Einspeiseverguetung InfluxDB"
unit_of_measurement: "EUR/kWh"
state: "{{ states('input_number.einspeiseverguetung') }}"
unique_id: einspeiseverguetung_influxdb
# friendly_name: "Einspeiseverguetung"
attributes:
update_now: "{{ (now().minute / 50) | round(0) }}"
Thats the working result. My bad was at
attributes:
attribute:
update_now: "{{ (now().minute / 50) | round(0) }}"
instead of
attributes:
update_now: "{{ (now().minute / 50) | round(0) }}"