Advertisement
Guest User

Untitled

a guest
Feb 24th, 2020
319
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.26 KB | None | 0 0
  1. sensor:
  2.     platform: template
  3.     sensors:
  4.       rifiuti:
  5.         friendly_name: "Rifiuti"
  6.         icon_template: mdi:delete-restore
  7.         value_template: "
  8.        {% if (now().timestamp() | int - (11*60*60)) | timestamp_custom('%w') == '1' %} Indifferenziato
  9.        {% elif (now().timestamp() | int - (11*60*60)) | timestamp_custom('%w') == '2' %} Plastica e umido
  10.        {% elif (now().timestamp() | int - (11*60*60)) | timestamp_custom('%w') == '3' %} Indifferenziato
  11.        {% elif (now().timestamp() | int - (11*60*60)) | timestamp_custom('%w') == '4' %} Umido
  12.        {% elif (now().timestamp() | int - (11*60*60)) | timestamp_custom('%w') == '5' %} Umido
  13.        {% elif (now().timestamp() | int - (11*60*60)) | timestamp_custom('%w') == '6' %} Niente
  14.        {% elif (now().timestamp() | int - (11*60*60)) | timestamp_custom('%w') == '0' %} Carta e umido
  15.        {% endif %}
  16.        "
  17. #        entity_id: sensor.date_time
  18.        
  19. sensor:      
  20.         platform: rest
  21.         name: Shelly
  22.         resource: http://192.168.2.122/status ### Edit to use the IP of your Shelly EM
  23.         value_template: '{{ value_json.emeters[0].power }}'
  24.         scan_interval: 30  ### Feel free to make faster, 30 or 60 sec would be fine
  25.         unit_of_measurement: W
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement