Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - platform: rest
- name: szambo
- resource: http://mojdomek.eu/api/api2.php?id=TUTAJ_ID
- method: GET
- value_template: "{{ value_json }}" # Pobieramy całe dane JSON
- json_attributes:
- - percent
- - batt_level
- - cm
- - nextfull
- - lastempty
- scan_interval: 1800
- - platform: template
- sensors:
- szambo_poziom:
- friendly_name: "Poziom szamba"
- value_template: "{{ state_attr('sensor.szambo', 'percent') | float }}"
- unit_of_measurement: '%'
- szambo_bateria:
- friendly_name: "Stan baterii"
- value_template: "{{ state_attr('sensor.szambo', 'batt_level') | float }}"
- unit_of_measurement: '%'
- szambo_cm:
- friendly_name: "Poziom szamba w cm"
- value_template: "{{ state_attr('sensor.szambo', 'cm') | float }}"
- unit_of_measurement: 'cm'
- szambo_nastepne_oproznienie:
- friendly_name: "Następne opróżnienie"
- value_template: "{{ state_attr('sensor.szambo', 'nextfull') }}"
- szambo_ostatnie_oproznienie:
- friendly_name: "Ostatnie opróżnienie"
- value_template: "{{ state_attr('sensor.szambo', 'lastempty') }}"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement