95 lines
3.3 KiB
YAML
95 lines
3.3 KiB
YAML
# Loads default set of integrations. Do not remove.
|
|
default_config:
|
|
|
|
recorder:
|
|
purge_keep_days: 100
|
|
|
|
python_script:
|
|
|
|
http:
|
|
use_x_forwarded_for: true
|
|
trusted_proxies:
|
|
- 192.168.178.77 # Ersetze dies durch die IP-Adresse deines Nginx Proxy Managers
|
|
- 192.168.178.2
|
|
- 172.17.0.0/16
|
|
# Load frontend themes from the themes folder
|
|
frontend:
|
|
themes: !include_dir_merge_named themes
|
|
homeassistant:
|
|
packages: !include_dir_named integrations
|
|
|
|
automation: !include automations.yaml
|
|
script: !include scripts.yaml
|
|
scene: !include scenes.yaml
|
|
template: !include templates.yaml
|
|
|
|
sensor:
|
|
#Tibber past costs
|
|
- platform: rest
|
|
unique_id: tibber_hourly_cost
|
|
name: Tibber Hourly Cost
|
|
resource: https://api.tibber.com/v1-beta/gql
|
|
method: POST
|
|
payload: '{ "query": "{ viewer { homes { consumption(resolution: HOURLY, last: 24) { nodes { consumption cost unitPrice unitPriceVAT from to } } } } }" }'
|
|
json_attributes_path: "$.data.viewer.homes[0].consumption"
|
|
json_attributes:
|
|
- nodes
|
|
value_template: "{{ value_json.data.viewer.homes[0].consumption.nodes[0].cost | float (default=0) }}"
|
|
scan_interval: 300
|
|
headers:
|
|
Authorization: !secret tibber_token
|
|
Content-Type: application/json
|
|
unit_of_measurement: EUR
|
|
state_class: total
|
|
- platform: rest
|
|
unique_id: tibber_daily_cost
|
|
name: Tibber Daily Cost
|
|
resource: https://api.tibber.com/v1-beta/gql
|
|
method: POST
|
|
payload: '{ "query": "{ viewer { homes { consumption(resolution: DAILY, last: 31) { nodes { consumption cost unitPrice unitPriceVAT from to } } } } }" }'
|
|
json_attributes_path: "$.data.viewer.homes[0].consumption"
|
|
json_attributes:
|
|
- nodes
|
|
value_template: "{{ value_json.data.viewer.homes[0].consumption.nodes[0].cost | float (default=0) }}"
|
|
scan_interval: 300
|
|
headers:
|
|
Authorization: !secret tibber_token
|
|
Content-Type: application/json
|
|
unit_of_measurement: EUR
|
|
state_class: total
|
|
|
|
#Tibber Future Costs
|
|
- platform: rest
|
|
unique_id: tibber_hourly_costs_today
|
|
name: Tibber Hourly Costs Today
|
|
resource: https://api.tibber.com/v1-beta/gql
|
|
method: POST
|
|
payload: '{ "query": "{ viewer { homes { currentSubscription { priceInfo { today {total energy tax startsAt } } }}}}" }'
|
|
json_attributes_path: "$.data.viewer.homes[0].currentSubscription.priceInfo"
|
|
json_attributes:
|
|
- today
|
|
value_template: "{{ value_json.data.viewer.homes[0].currentSubscription.priceInfo.today[0].total | float (default=0) }}"
|
|
scan_interval: 300
|
|
headers:
|
|
Authorization: !secret tibber_token
|
|
Content-Type: application/json
|
|
unit_of_measurement: EUR
|
|
state_class: total
|
|
- platform: rest
|
|
unique_id: tibber_hourly_costs_tomorrow
|
|
name: Tibber Hourly Costs Tomorrow
|
|
resource: https://api.tibber.com/v1-beta/gql
|
|
method: POST
|
|
payload: '{ "query": "{ viewer { homes { currentSubscription { priceInfo { tomorrow {total energy tax startsAt } } }}}}" }'
|
|
|
|
json_attributes_path: "$.data.viewer.homes[0].currentSubscription.priceInfo"
|
|
json_attributes:
|
|
- tomorrow
|
|
value_template: "{{ value_json.data.viewer.homes[0].currentSubscription.priceInfo.tomorrow[0].total | float (default=0) }}"
|
|
scan_interval: 300
|
|
headers:
|
|
Authorization: !secret tibber_token
|
|
Content-Type: application/json
|
|
unit_of_measurement: EUR
|
|
state_class: total
|