This file contains 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
# Configure a default setup of Home Assistant (frontend, api, etc) | |
default_config: | |
# Text to speech | |
tts: | |
- platform: google_translate | |
group: !include groups.yaml | |
automation: !include automations.yaml |
This file contains 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: template | |
sensors: | |
pzem_kwh: | |
unit_of_measurement: kWh | |
value_template: "{{ states('sensor.pzem_004t_v3_energy') | float / 1000 }}" | |
utility_meter: | |
daily_energy_pzem: |
This file contains 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
binary_sensor: | |
- platform: template | |
sensors: | |
fridge_top_temperature_is_ok: | |
value_template: >- | |
{{ (states('sensor.0x00158d00045f5f93_temperature') | float > 5) | |
and (states('sensor.0x00158d00045f5f93_temperature') | float < 12) }} | |
fridge_bottom_temperature_is_ok: |
This file contains 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
#!/usr/bin/perl | |
=encoding UTF-8 | |
=cut | |
=head1 DESCRIPTION | |
=cut | |
# common modules |
This file contains 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
$ curl -s 'https://www.artlebedev.ru/country-list/tab/' > countries.tsv; curl -s 'https://analytics.home-assistant.io/data.json' |perl -MJSON::PP -MData::Dumper -nalE '$c .= $_; }{ $d = decode_json $c; foreach (keys %{$d}) { if ($d->{$_}->{countries}) { foreach $id (keys %{$d->{$_}->{countries}}) { say $id, " ", $d->{$_}->{countries}->{$id}} } }'|sort -k2 -nr|head -30|perl -C -nalE '$tsv = `cat countries.tsv`; @lines = split/\n/, $tsv; foreach (@lines) { @f = split /\t/,$_; $id2name{$f[3]} = $f[0] }; $i++; say sprintf "%2s %2s %-25s %10s", $i, $F[0], $id2name{$F[0]}, $F[1]' | |
1 US Соединенные Штаты 1613 | |
2 NL Нидерланды 974 | |
3 DE Германия 790 | |
4 GB Соединенное Королевство 655 | |
5 PL Польша 490 | |
6 IT Италия 414 | |
7 SE Швеция 365 | |
8 FR Франция 316 | |
9 AU Австралия 303 |
This file contains 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
default_config: | |
input_number: | |
n1: | |
min: 0 | |
max: 100 | |
step: 1 | |
input_boolean: | |
b1: |
This file contains 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
bessarabov@bessarabov-osx:~/Dropbox/git/core$ git tag|perl -nalE 'say if /\.0\z/'|perl -nalE 'say if /^2/ || /^0\.11/'|perl -nalE 'say $_, " ", `git show --format=%at $_`'|perl -nalE 'say if /\S/' |perl -nalE 'say sprintf "%-12s %1s", $F[0], `date -r $F[1]`'|perl -nalE 'say if /\S/' | |
0.110.0 Wed May 20 11:14:49 MSK 2020 | |
0.111.0 Wed Jun 10 17:07:38 MSK 2020 | |
0.112.0 Wed Jul 1 17:47:17 MSK 2020 | |
0.113.0 Wed Jul 22 18:45:03 MSK 2020 | |
0.114.0 Wed Aug 12 13:52:23 MSK 2020 | |
0.115.0 Thu Sep 17 18:37:29 MSK 2020 | |
0.116.0 Wed Oct 7 18:50:57 MSK 2020 | |
0.117.0 Wed Oct 28 22:01:21 MSK 2020 | |
0.118.0 Wed Nov 18 21:01:29 MSK 2020 |
This file contains 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
esphome: | |
name: garage_dht22 | |
platform: ESP8266 | |
board: d1_mini | |
wifi: | |
ssid: !secret wifi_ssid | |
password: !secret wifi_password | |
logger: |
This file contains 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
sqlite> select state_id, created, state from states where entity_id = 'sensor.0x04cf8cdf3c77656a_illuminance' and created > '2021-03-24 01' order by state_id limit 40; | |
state_id created state | |
---------- -------------------------- ---------- | |
15748089 2021-03-24 02:33:23.770811 0 | |
15751204 2021-03-24 03:00:33.952611 0 | |
15751482 2021-03-24 03:03:23.234313 0 | |
15751485 2021-03-24 03:03:23.238100 3011 | |
15751830 2021-03-24 03:06:22.438813 3011 | |
15751833 2021-03-24 03:06:22.440488 4772 | |
15752210 2021-03-24 03:09:46.574502 4772 |
This file contains 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
Благодаря этому уникальному упражнению, вы, совершенно не зная ни одного языка программирования, сможете почувствовать себя настоящим программистом-профессионалом! | |
Для упражнения потребуются: | |
― два участника; | |
― часы (желательно с секундомером); | |
― листок чистой бумаги; | |
― ручка (шариковая или гелевая, но именно ручка,- это важно). | |
Один из участников будет "Заказчиком" (Работодателем), другой ― "Исполнителем" (Программистом). | |
"Заказчику" выдаются часы и право голоса, "Исполнителю" ― бумага и ручка. |