add fridge and fitolamp
This commit is contained in:
@@ -25,6 +25,14 @@ xmas_tree_timer:
|
||||
global_dependencies:
|
||||
- globals
|
||||
|
||||
fitolamp_timer:
|
||||
module: entity_timer
|
||||
class: EntityTimer
|
||||
on_time: "00:00:00"
|
||||
off_time: "07:00:00"
|
||||
entity: switch.plug_158d0002924779
|
||||
global_dependencies:
|
||||
- globals
|
||||
# tv_timer:
|
||||
# module: entity_timer
|
||||
# class: EntityTimer
|
||||
|
||||
@@ -71,6 +71,7 @@ services:
|
||||
links:
|
||||
- "hass"
|
||||
- "appdaemon"
|
||||
- "certbot"
|
||||
env_file: ./nginx/settings/nginx.env
|
||||
volumes:
|
||||
- ./hass/settings/hosts.txt:/etc/hosts:ro
|
||||
|
||||
@@ -12,3 +12,7 @@ switch.xiaomi_miio_switch:
|
||||
friendly_name: Удлиннитель
|
||||
switch.wifi_socket:
|
||||
friendly_name: Гирлянда-окно
|
||||
switch.plug_158d00020f3a29:
|
||||
friendly_name: Холодильник
|
||||
switch.plug_158d0002924779:
|
||||
friendly_name: Фитолампа
|
||||
@@ -32,6 +32,14 @@
|
||||
friendly_name: "Кондиционер в мес."
|
||||
unit_of_measurement: '₽'
|
||||
value_template: "{{ (states('sensor.conditioner_monthly') | float * (states('sensor.power_cost') | float)) | round(2) }}"
|
||||
fridge_money_monthly:
|
||||
friendly_name: "Холодильник в мес."
|
||||
unit_of_measurement: '₽'
|
||||
value_template: "{{ (states('sensor.fridge_monthly') | float * (states('sensor.power_cost') | float)) | round(2) }}"
|
||||
fitolamp_money_monthly:
|
||||
friendly_name: "Фитолампа в мес."
|
||||
unit_of_measurement: '₽'
|
||||
value_template: "{{ (states('sensor.fitolamp_monthly') | float * (states('sensor.power_cost') | float)) | round(2) }}"
|
||||
power_money_t1_monthly:
|
||||
friendly_name: "Т1 в мес."
|
||||
unit_of_measurement: '₽'
|
||||
@@ -50,7 +58,6 @@
|
||||
value_template: "{{ ((states('sensor.power_money_t1_monthly') | float) + (states('sensor.power_money_t2_monthly') | float) + (states('sensor.power_money_t3_monthly') | float)) | round(2) }}"
|
||||
|
||||
|
||||
|
||||
counter_hot_money_daily:
|
||||
friendly_name: "Горячая в день"
|
||||
unit_of_measurement: '₽'
|
||||
@@ -83,6 +90,14 @@
|
||||
friendly_name: "Кондиционер в день"
|
||||
unit_of_measurement: '₽'
|
||||
value_template: "{{ (states('sensor.conditioner_daily') | float * (states('sensor.power_cost') | float)) | round(2) }}"
|
||||
fridge_money_daily:
|
||||
friendly_name: "Холодильник в день"
|
||||
unit_of_measurement: '₽'
|
||||
value_template: "{{ (states('sensor.fridge_daily') | float * (states('sensor.power_cost') | float)) | round(2) }}"
|
||||
fitolamp_money_daily:
|
||||
friendly_name: "Фитолампа в день"
|
||||
unit_of_measurement: '₽'
|
||||
value_template: "{{ (states('sensor.fitolamp_daily') | float * (states('sensor.power_cost') | float)) | round(2) }}"
|
||||
|
||||
counter_hot_money_hourly:
|
||||
friendly_name: "Горячая в час"
|
||||
@@ -116,3 +131,11 @@
|
||||
friendly_name: "Кондиционер в час"
|
||||
unit_of_measurement: '₽'
|
||||
value_template: "{{ (states('sensor.conditioner_hourly') | float * (states('sensor.power_cost') | float)) | round(2) }}"
|
||||
fridge_money_hourly:
|
||||
friendly_name: "Холодильник в час"
|
||||
unit_of_measurement: '₽'
|
||||
value_template: "{{ (states('sensor.fridge_hourly') | float * (states('sensor.power_cost') | float)) | round(2) }}"
|
||||
fitolamp_money_hourly:
|
||||
friendly_name: "Фитолампа в час"
|
||||
unit_of_measurement: '₽'
|
||||
value_template: "{{ (states('sensor.fitolamp_hourly') | float * (states('sensor.power_cost') | float)) | round(2) }}"
|
||||
|
||||
@@ -20,3 +20,12 @@
|
||||
friendly_name: "Кондиционер потреблено"
|
||||
unit_of_measurement: 'kWh'
|
||||
value_template: "{{ state_attr('switch.plug_158d00010dd98d', 'power_consumed') / 1000 }}"
|
||||
fridge_consumed:
|
||||
friendly_name: "Холодильник потреблено"
|
||||
unit_of_measurement: 'kWh'
|
||||
value_template: "{{ state_attr('switch.plug_158d00020f3a29', 'power_consumed') / 1000 }}"
|
||||
fitolamp_consumed:
|
||||
friendly_name: "Фитолампа потреблено"
|
||||
unit_of_measurement: 'kWh'
|
||||
value_template: "{{ state_attr('switch.plug_158d0002924779', 'power_consumed') / 1000 }}"
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
fitolamp_hourly:
|
||||
source: sensor.fitolamp_consumed
|
||||
cycle: hourly
|
||||
fitolamp_daily:
|
||||
source: sensor.fitolamp_consumed
|
||||
cycle: daily
|
||||
fitolamp_monthly:
|
||||
source: sensor.fitolamp_consumed
|
||||
cycle: monthly
|
||||
@@ -0,0 +1,9 @@
|
||||
fridge_hourly:
|
||||
source: sensor.fridge_consumed
|
||||
cycle: hourly
|
||||
fridge_daily:
|
||||
source: sensor.fridge_consumed
|
||||
cycle: daily
|
||||
fridge_monthly:
|
||||
source: sensor.fridge_consumed
|
||||
cycle: monthly
|
||||
@@ -40,6 +40,8 @@ views:
|
||||
- switch.plug_158d0001a68b18
|
||||
- switch.plug_158d0001a68c64
|
||||
- switch.plug_158d0001a4cfb4
|
||||
- switch.plug_158d00020f3a29
|
||||
- switch.plug_158d0002924779
|
||||
- switch.xiaomi_miio_switch
|
||||
- type: entities
|
||||
title: "Ванная"
|
||||
@@ -260,6 +262,26 @@ views:
|
||||
- sensor.conditioner_money_hourly
|
||||
- sensor.conditioner_money_daily
|
||||
- sensor.conditioner_money_monthly
|
||||
- type: entities
|
||||
title: "Холодильник"
|
||||
show_header_toggle: false
|
||||
entities:
|
||||
- sensor.fridge_hourly
|
||||
- sensor.fridge_daily
|
||||
- sensor.fridge_monthly
|
||||
- sensor.fridge_money_hourly
|
||||
- sensor.fridge_money_daily
|
||||
- sensor.fridge_money_monthly
|
||||
- type: entities
|
||||
title: "Фитолампа"
|
||||
show_header_toggle: false
|
||||
entities:
|
||||
- sensor.fitolamp_hourly
|
||||
- sensor.fitolamp_daily
|
||||
- sensor.fitolamp_monthly
|
||||
- sensor.fitolamp_money_hourly
|
||||
- sensor.fitolamp_money_daily
|
||||
- sensor.fitolamp_money_monthly
|
||||
- type: entities
|
||||
title: "Теория трехтарифника"
|
||||
show_header_toggle: false
|
||||
|
||||
@@ -11,7 +11,7 @@ server {
|
||||
|
||||
#letsencrypt challenge response
|
||||
location ~/.well-known/acme-challenge/(.*)$ {
|
||||
return 200 '$1';
|
||||
proxy_pass http://certbot;
|
||||
}
|
||||
|
||||
location / {
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
server {
|
||||
listen 80 default_server;
|
||||
#listen 443 default ssl;
|
||||
|
||||
server_name _;
|
||||
|
||||
#ssl_certificate /config/keys/cert.crt;
|
||||
#ssl_certificate_key /config/keys/cert.key;
|
||||
|
||||
client_max_body_size 0;
|
||||
|
||||
#letsencrypt challenge response
|
||||
CdVsNcvBapg7d3o0ZaixdMbMt5FqG7T7Z19CJsotuGI.hTi2mqIkE64NQibEfAxiC4ih0s6_pk4Ne2hCgHXFntI location ~/.well-known/acme-challenge/(.*)$ {
|
||||
return 200 '$1';
|
||||
}
|
||||
|
||||
location / {
|
||||
real_ip_header X-Forwarded-For;
|
||||
set_real_ip_from 0.0.0.0/0;
|
||||
|
||||
proxy_pass http://hass;
|
||||
proxy_set_header Host $host;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header X-Forwarded-Host $remote_addr;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
}
|
||||
}
|
||||
@@ -31,11 +31,8 @@ server {
|
||||
#limit_conn perip 10;
|
||||
|
||||
#access_log off;
|
||||
location ~/.well-known/acme-challenge/(.*)\.(.*)$ {
|
||||
return 200 '$1';
|
||||
}
|
||||
location ~/.well-known/acme-challenge/(.*)$ {
|
||||
return 200 '$1';
|
||||
proxy_pass http://certbot;
|
||||
}
|
||||
|
||||
location / {
|
||||
|
||||
Reference in New Issue
Block a user