Advertisement
Hoekeren75

Untitled

Mar 18th, 2023
722
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.04 KB | None | 0 0
  1. - platform: rest
  2.   name: "Flowcloud enhedsoversigt"
  3.   resource: https://frese-api.cloud.atkins.dk/v1/poc/devices/all?
  4.   value_template: '{{ value_json.status }}'
  5.   scan_interval: 600
  6.   json_attributes:
  7.    - devices
  8.   headers:
  9.     API_KEY: 63a93b31-7a00-4efd-8c26-e261402a5a92
  10.     connection: keep-alive
  11.    
  12.  
  13. - platform: template
  14.   sensors:
  15.     flowcloud_outlet_temperature:
  16.       value_template: "{{ state_attr('sensor.flowcloud_enhedsoversigt', 'devices')[0].json_value.outlet_temperature }}"
  17.       unit_of_measurement: "°C"
  18.     flowcloud_inlet_temperature:
  19.       value_template: "{{ state_attr('sensor.flowcloud_enhedsoversigt', 'devices')[0].json_value.inlet_temperature }}"
  20.       unit_of_measurement: "°C"
  21.  
  22. ### DELTA-T ###
  23. - platform: template
  24.   sensors:
  25.     delta_t:
  26.       value_template: >
  27.        {{ '%0.1f' | format(states('sensor.flowcloud_inlet_temperature') | float -
  28.                             states('sensor.flowcloud_outlet_temperature') | float)  }}
  29.       unit_of_measurement: "°C"
  30.       friendly_name: Delta-T
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement