Untitled

mail@pastecode.io avatar
unknown
yaml
2 years ago
1.7 kB
16
Indexable
Never
- platform: template
  sensors:
      szambo_percent:
        friendly_name: "Procent"
        value_template: "{{ state_attr('sensor.szambo_report', 'locations')[0].measurement.percent }}"
        unit_of_measurement: "%"
      szambo_cm:
        friendly_name: "CM"
        value_template: "{{ state_attr('sensor.szambo_report', 'locations')[0].measurement.cm }}"
        unit_of_measurement: "cm"
      temperature:
        friendly_name: "Temperatura"
        value_template: "{{ state_attr('sensor.szambo_report', 'locations')[0].measurement.temperature }}"
        unit_of_measurement: "°C"
      volts:
        friendly_name: "Napięcie"
        value_template: "{{ state_attr('sensor.szambo_report', 'locations')[0].measurement.volts }}"
        unit_of_measurement: "Volts"
      batt_level:
        friendly_name: "Procent baterii"
        value_template: "{{ state_attr('sensor.szambo_report', 'locations')[0].measurement.batt_level }}"
      rssi:
        friendly_name: "Zasięg Wifi"
        value_template: "{{ state_attr('sensor.szambo_report', 'locations')[0].measurement.rssi }}"
        unit_of_measurement: "%"
      nextfull:
        friendly_name: "Następny wywóz"
        value_template: "{{ state_attr('sensor.szambo_report', 'locations')[0].measurement.nextfull }}"
        unit_of_measurement: ""
      lastempty:
        friendly_name: "Ostatni wywóz"
        value_template: "{{ state_attr('sensor.szambo_report', 'locations')[0].measurement.lastempty }}"
        unit_of_measurement: "%"
      datatime:
        friendly_name: "Ostatnio sprawdzono"
        value_template: "{{ state_attr('sensor.szambo_report', 'locations')[0].measurement.datatime }}"
        unit_of_measurement: ""