SHARE
TWEET

Untitled

a guest Feb 25th, 2020 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.   - platform: rest
  19.     name: Shelly
  20.     resource: http://192.168.2.122/status ### Edit to use the IP of your Shelly EM
  21.     value_template: '{{ value_json.emeters[0].power }}'
  22.     scan_interval: 30  ### Feel free to make faster, 30 or 60 sec would be fine
  23.     unit_of_measurement: W
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top