Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sensor:
- - platform: template
- sensors:
- rifiuti:
- friendly_name: "Rifiuti"
- icon_template: mdi:delete-restore
- value_template: "
- {% if (now().timestamp() | int - (11*60*60)) | timestamp_custom('%w') == '1' %} Indifferenziato
- {% elif (now().timestamp() | int - (11*60*60)) | timestamp_custom('%w') == '2' %} Plastica e umido
- {% elif (now().timestamp() | int - (11*60*60)) | timestamp_custom('%w') == '3' %} Indifferenziato
- {% elif (now().timestamp() | int - (11*60*60)) | timestamp_custom('%w') == '4' %} Umido
- {% elif (now().timestamp() | int - (11*60*60)) | timestamp_custom('%w') == '5' %} Umido
- {% elif (now().timestamp() | int - (11*60*60)) | timestamp_custom('%w') == '6' %} Niente
- {% elif (now().timestamp() | int - (11*60*60)) | timestamp_custom('%w') == '0' %} Carta e umido
- {% endif %}
- "
- # entity_id: sensor.date_time
- - platform: rest
- name: Shelly
- resource: http://192.168.2.122/status ### Edit to use the IP of your Shelly EM
- value_template: '{{ value_json.emeters[0].power }}'
- scan_interval: 30 ### Feel free to make faster, 30 or 60 sec would be fine
- unit_of_measurement: W
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement