forked from wectrl-net/bg_ED_data
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfiguration.yaml
72 lines (69 loc) · 3.24 KB
/
configuration.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
##
## ------------## CEZ Price scraper and checck for outages ## -------------------------------------------------------------
# https://github.com/maslyankov/bg_electricity_distributors_api.git
sensor:
# Chez / electrohold.bg - Start
- platform: scrape
resource: https://ermzapad.bg/bg/za-klienta/ceni-i-nachini-na-plashane/ceni-za-dostp-i-prenos/
name: Electricity price (access cost)
select: 'span[style="color:#333333"]'
value_template: '{{( value | replace (",", ".") | float * 1.2 )| round(5) }}'
index: 5
unit_of_measurement: "BGN/kWh"
can_interval: 21600 # every 6 hours
- platform: scrape
resource: https://ermzapad.bg/bg/za-klienta/ceni-i-nachini-na-plashane/ceni-za-dostp-i-prenos/
name: Electricity price (transmission cost for mid voltage dist net)
select: 'span[style="color:#333333"]'
value_template: '{{( value | replace (",", ".") | float * 1.2 )| round(5) }}'
index: 7
unit_of_measurement: "BGN/kWh"
scan_interval: 21600 # every 6 hours
## ## ## ## ## ## ## ## ## ##
- platform: scrape
resource: https://electrohold.bg/bg/sales/domakinstva/snabdyavane-po-regulirani-ceni/
name: "CEZ Night tariff"
select: 'td[class="xl65"]'
value_template: '{{( value | replace (",", ".") | float * 1.2 )| round(5) }}'
index: 3
unit_of_measurement: "BGN/kWh"
scan_interval: 21600 # every 6 hours
- platform: scrape
resource: https://electrohold.bg/bg/sales/domakinstva/snabdyavane-po-regulirani-ceni/
name: "CEZ Day tariff"
select: 'td[class="xl65"]'
value_template: '{{( value | replace (",", ".") | float * 1.2 )| round(5) }}'
index: 1
unit_of_measurement: "BGN/kWh"
can_interval: 21600 # every 6 hours
## ## ## ## ## ## ## ## ## ##
#
- platform: template
sensors:
cez_total_price_day:
unit_of_measurement: "BGN/kWh"
value_template: "{{ states('sensor.cez_day_tariff') | float + states('sensor.electricity_price_access_cost') | float + states('sensor.electricity_price_transmission_cost_for_mid_voltage_dist_net') | float | round(5) }}"
- platform: template
sensors:
cez_total_price_night:
unit_of_measurement: "BGN/kWh"
value_template: "{{ states('sensor.cez_night_tariff') | float + states('sensor.electricity_price_access_cost') | float + states('sensor.electricity_price_transmission_cost_for_mid_voltage_dist_net') | float | round(5) }}"
- platform: rest
name: "Electricity - Current Outage"
resource: https://info.electrohold.bg/webint/vok/avplan.php
method: POST
payload: "action=viewitn&itn=1234567890" # Change client id
value_template: '{{ value.encode().decode("utf-8-sig").split("При липса")[0] }}'
scan_interval: 1800 # every 1/2 hour
headers:
Content-Type: "application/x-www-form-urlencoded; charset=utf-8"
- platform: rest
name: "Electricity - Planned Outages"
resource: https://info.electrohold.bg/webint/vok/avplan.php
method: POST
payload: "action=viewitn_plan&itn=1234567890" # Change client id
value_template: '{{ value.encode().decode("utf-8-sig") }}'
scan_interval: 1800 # every 1/2 hour
headers:
Content-Type: "application/x-www-form-urlencoded; charset=utf-8"
# Chez / electrohold.bg - end