This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
substitutions: | |
device_name: kyxna-blok-5v | |
entity_name: kyxna_blok_5v | |
entity_friendly_name: kyxna blok 5v | |
device_name_wifi: kyxnablok5v | |
switch_dop_name: '' | |
switch_restore_mode: RESTORE_DEFAULT_ON | |
integration_method: trapezoid | |
switch_icon: "mdi:power-socket-eu" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
substitutions: | |
device_name: kyxna-occupancy | |
device_name2: kyxna_occupancy | |
device_name_wifi: kyxncupancy | |
esphome: | |
name: ${device_name} | |
platform: ESP8266 | |
board: d1_mini | |
includes: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sensor: | |
- platform: hx711 | |
dout_pin: 14 | |
id: sensor_hx711_d | |
name: ${device_name2} | |
unit_of_measurement: "%" | |
clk_pin: 5 | |
gain: 128 | |
update_interval: 1s | |
filters: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################################################################# | |
Создать службу для записи в файл | |
notify: | |
- name: rk_automatic_temperature_l6 | |
platform: file | |
filename: /config/txt/rk_automatic_temperature_l6.csv | |
################################################################################# | |
Создать файл /config/txt/rk_automatic_temperature_l6_bk.csv | |
В шапку файла прописать TIME,VALUE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
old.state AS old_state | |
,new.state AS new_state | |
,old.last_updated AS old_last_updated | |
,new.last_updated AS new_last_updated | |
,LAG(old.last_updated,1) OVER (ORDER BY old.last_updated) old_old_last_updated | |
,new.last_updated - LAG(old.last_updated,1) OVER (ORDER BY old.last_updated) AS diff_time | |
FROM homeassistant.states AS new | |
LEFT JOIN homeassistant.states AS old ON (old.old_state_id = new.state_id) | |
WHERE old.entity_id = 'sensor.sensor' -- сенсор |