Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
aneisch committed Aug 7, 2023
1 parent a806111 commit 676d734
Show file tree
Hide file tree
Showing 18 changed files with 70 additions and 68 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,20 +55,20 @@ Also using Grafana/Influx for graphing, both running in Docker containers on NUC
## Some statistics about my installation:
Description | value
-- | --
Lines of ESPHome YAML | 2420
Lines of Home Assistant YAML | 7760
[Integrations](https://www.home-assistant.io/integrations/) in use | 50
Zigbee devices in [`zha`](https://www.home-assistant.io/integrations/zha/) |
Lines of ESPHome YAML | 2353
Lines of Home Assistant YAML | 7758
[Integrations](https://www.home-assistant.io/integrations/) in use | 49
Zigbee devices in [`zha`](https://www.home-assistant.io/integrations/zha/) | 26
Z-Wave devices in [`zwave_js`](https://www.home-assistant.io/integrations/zwave_js/) | 37

Description | value
-- | --
Entities in the [`alarm_control_panel`](https://www.home-assistant.io/components/alarm_control_panel) domain | 1
Entities in the [`automation`](https://www.home-assistant.io/components/automation) domain | 98
Entities in the [`binary_sensor`](https://www.home-assistant.io/components/binary_sensor) domain | 115
Entities in the [`button`](https://www.home-assistant.io/components/button) domain | 10
Entities in the [`binary_sensor`](https://www.home-assistant.io/components/binary_sensor) domain | 118
Entities in the [`button`](https://www.home-assistant.io/components/button) domain | 11
Entities in the [`calendar`](https://www.home-assistant.io/components/calendar) domain | 1
Entities in the [`camera`](https://www.home-assistant.io/components/camera) domain | 17
Entities in the [`camera`](https://www.home-assistant.io/components/camera) domain | 16
Entities in the [`climate`](https://www.home-assistant.io/components/climate) domain | 1
Entities in the [`counter`](https://www.home-assistant.io/components/counter) domain | 1
Entities in the [`cover`](https://www.home-assistant.io/components/cover) domain | 8
Expand All @@ -90,16 +90,16 @@ Entities in the [`remote`](https://www.home-assistant.io/components/remote) doma
Entities in the [`scene`](https://www.home-assistant.io/components/scene) domain | 2
Entities in the [`script`](https://www.home-assistant.io/components/script) domain | 39
Entities in the [`select`](https://www.home-assistant.io/components/select) domain | 2
Entities in the [`sensor`](https://www.home-assistant.io/components/sensor) domain | 361
Entities in the [`sensor`](https://www.home-assistant.io/components/sensor) domain | 362
Entities in the [`siren`](https://www.home-assistant.io/components/siren) domain | 1
Entities in the [`sun`](https://www.home-assistant.io/components/sun) domain | 1
Entities in the [`switch`](https://www.home-assistant.io/components/switch) domain | 145
Entities in the [`switch`](https://www.home-assistant.io/components/switch) domain | 149
Entities in the [`timer`](https://www.home-assistant.io/components/timer) domain | 2
Entities in the [`update`](https://www.home-assistant.io/components/update) domain | 2
Entities in the [`vacuum`](https://www.home-assistant.io/components/vacuum) domain | 1
Entities in the [`weather`](https://www.home-assistant.io/components/weather) domain | 2
Entities in the [`zone`](https://www.home-assistant.io/components/zone) domain | 6
**Total state objects** | **984**
**Total state objects** | **992**
## The HACS integrations/plugins that I use:
**Appdaemon**:<br>
[aneisch/follow_me_appdaemon](https://github.com/aneisch/follow_me_appdaemon)<br>
Expand Down
8 changes: 3 additions & 5 deletions automations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,8 @@
action:
- service: alexa_media.clear_history

- alias: "Update door last opened"
id: "update_door_last_opened"
- alias: "Update 'Last' Datetimes"
id: "update_last_datetimes"
trigger:
- platform: state
entity_id:
Expand All @@ -223,14 +223,12 @@
- binary_sensor.garage_exterior_door
- binary_sensor.garage_interior_door
- binary_sensor.master_bedroom_exterior_door
- binary_sensor.garage_interior_motion
- binary_sensor.garage_motion # Camera Based
- input_boolean.kitchen_motion
- binary_sensor.living_room_motion
- binary_sensor.hallway_motion
from: "off"
to: "on"
- platform: state
entity_id: sensor.433_front_porch_motion
action:
service: input_datetime.set_datetime
data:
Expand Down
2 changes: 1 addition & 1 deletion configuration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ utility_meter:

zha:
enable_quirks: true
custom_quirks_path: /config/custom_zha_quirks/
#custom_quirks_path: /config/custom_zha_quirks/
zigpy_config:
network:
channel: 11
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ def create_empty_map_image(colors: Colors, text: str = "NO MAP") -> ImageType:
else:
text_color = (255, 255, 255)
draw = ImageDraw.Draw(image, "RGBA")
w, h = draw.textsize(text)
l, t, r, b = draw.textbbox((0, 0), text)
w, h = r - l, b - t
draw.text(((image.size[0] - w) / 2, (image.size[1] - h) / 2), text, fill=text_color)
return image

Expand Down Expand Up @@ -256,7 +257,7 @@ def draw_func(draw: ImageDraw):
point = position.to_img(image.dimensions)
angle = -position.a if position.a is not None else 0
coords = [point.x - r, point.y - r, point.x + r, point.y + r]
draw.pieslice(coords, angle + 90, angle - 90, outline="black", fill=fill)
draw.pieslice(coords, angle + 90, angle - 90, outline=outline, fill=fill)

ImageHandler.__draw_on_new_layer__(image, draw_func, 1, ImageHandler.__use_transparency__(outline, fill))

Expand Down Expand Up @@ -303,7 +304,8 @@ def draw_func(draw: ImageDraw):
except ImportError:
_LOGGER.warning("Unable to open font: %s", font_file)
finally:
w, h = draw.textsize(text, font)
l, t, r, b = draw.textbbox((0, 0), text, font)
w, h = r - l, b - t
draw.text((x - w / 2, y - h / 2), text, font=font, fill=color)

ImageHandler.__draw_on_new_layer__(image, draw_func, 1, ImageHandler.__use_transparency__(color))
Expand Down
1 change: 1 addition & 0 deletions custom_components/xiaomi_cloud_map_extractor/services.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
reload:
name: Reload
description: Reload all entities of Xiaomi Cloud Map Extractor platform
2 changes: 1 addition & 1 deletion extras/Node-RED/flows.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion extras/appdaemon/apps/apps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ Code Project Docker:
module: entity_timer
class: Timer
time_on: "08:00:00"
time_off: "00:00:00"
time_off: sunset + 00:30:00
entities: switch.docker_codeproject

BVST Docker:
Expand Down
20 changes: 10 additions & 10 deletions extras/docker-compose/homeassistant/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
version: '3.2'

volumes:
# https://rclone.org/docker/
frigate-drive:
driver: rclone:latest
driver_opts:
remote: 'frigate-drive:homeassistant'
allow_other: 'true'
vfs_cache_mode: full
poll_interval: 0
#volumes:
# # https://rclone.org/docker/
# frigate-drive:
# driver: rclone:latest
# driver_opts:
# remote: 'frigate-drive:homeassistant'
# allow_other: 'true'
# vfs_cache_mode: full
# poll_interval: 0

services:
homeassistant:
Expand All @@ -24,7 +24,7 @@ services:
- /tmp/radar.gif:/tmp/radar.gif
- /sys/class/hwmon/hwmon1/temp1_input:/sys/class/thermal/thermal_zone0/temp:ro
- /etc/localtime:/etc/localtime:ro
- frigate-drive:/frigate
#- frigate-drive:/frigate
devices:
- /dev/zigbee
- /dev/usb_modem_sim7080g:/dev/cellular_modem
Expand Down
20 changes: 10 additions & 10 deletions extras/docker-compose/unified/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Concat 'homeassistant' and 'other' docker-compose files
version: '3.2'

volumes:
# https://rclone.org/docker/
frigate-drive:
driver: rclone:latest
driver_opts:
remote: 'frigate-drive:homeassistant'
allow_other: 'true'
vfs_cache_mode: full
poll_interval: 0
#volumes:
# # https://rclone.org/docker/
# frigate-drive:
# driver: rclone:latest
# driver_opts:
# remote: 'frigate-drive:homeassistant'
# allow_other: 'true'
# vfs_cache_mode: full
# poll_interval: 0

services:
homeassistant:
Expand All @@ -25,7 +25,7 @@ services:
- /tmp/radar.gif:/tmp/radar.gif
- /sys/class/hwmon/hwmon1/temp1_input:/sys/class/thermal/thermal_zone0/temp:ro
- /etc/localtime:/etc/localtime:ro
- frigate-drive:/frigate
#- frigate-drive:/frigate
devices:
- /dev/zigbee
- /dev/usb_modem_sim7080g:/dev/cellular_modem
Expand Down
4 changes: 2 additions & 2 deletions extras/esphome/mom_and_dad_gate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ esphome:
platformio_options:
platform: espressif8266@2.6.3
platform_packages:
- platformio/toolchain-xtensa@2.40802.200502
- platformio/framework-arduinoespressif8266@3.20704.0
- platformio/toolchain-xtensa
- platformio/framework-arduinoespressif8266

web_server:
port: 80
Expand Down
1 change: 1 addition & 0 deletions github_action_secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ ups_password: key
17track_pass: password

#configuration.yaml
amcrest_password: password
hass_url: https://not_really_it.com
elevation: 60000
home_lat: 00.00
Expand Down
Binary file modified images/nodered_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/nodered_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 0 additions & 4 deletions input_datetime.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,3 @@ hallway_motion_last:
name: Last Hallway Motion
has_date: true
has_time: true
433_front_porch_motion_last:
name: Last Front Porch Motion
has_date: true
has_time: true
12 changes: 9 additions & 3 deletions packages/frigate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ automation:
condition: "{{ trigger.payload_json['after']['label'] == 'person' }}"
action:
# Always backup clip to offsite
- service: shell_command.frigate_clips_drive
data:
clip_id: "{{trigger.payload_json['after']['id']}}"
# - service: shell_command.frigate_clips_drive
# data:
# clip_id: "{{trigger.payload_json['after']['id']}}"
# Play audio clip
# - if:
# - "{{ trigger.payload_json['after']['camera'] == 'front_door' }}"
Expand Down Expand Up @@ -197,6 +197,12 @@ automation:
option: "{% if trigger.to_state.state == 'on' %}On{% elif trigger.to_state.state == 'off' %}Off{% endif %}"
target:
entity_id: select.front_door_security_light
- delay: "00:00:05"
- service: select.select_option
data:
option: "{% if trigger.to_state.state == 'on' %}On{% elif trigger.to_state.state == 'off' %}Off{% endif %}"
target:
entity_id: select.front_door_security_light

command_line:
- switch:
Expand Down
2 changes: 2 additions & 0 deletions rest_command.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ surround_vol_down:
surround_vol_mute:
url: "http://10.0.0.18/?btnAction=MUTE"
method: get


30 changes: 13 additions & 17 deletions template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,20 +109,16 @@
- name: "433 Weather Battery OK"
state: "{{ trigger.payload_json.battery_ok }}"
device_class: battery

# Mailbox
# Front porch for now
- trigger:
# - platform: mqtt
# topic: "sensor/rtl_433_office"
# payload: True
# value_template: "{{ value_json.model == 'Smoke-GS558' and value_json.id == 13751 and value_json.code == '06b6fd' }}"
- platform: mqtt
topic: "sensor/rtl_433_attic"
payload: "True"
value_template: "{{ value_json.model == 'Smoke-GS558' and value_json.id == 13751 and value_json.code == '06b6fd' }}"
sensor:
# - name: "433 Mailbox Last Opened"
# state: "{{ now() }}"
- name: "433 Front Porch Motion"
state: "{{ now() }}"
# Unused
# - trigger:
# # - platform: mqtt
# # topic: "sensor/rtl_433_office"
# # payload: True
# # value_template: "{{ value_json.model == 'Smoke-GS558' and value_json.id == 13751 and value_json.code == '06b6fd' }}"
# - platform: mqtt
# topic: "sensor/rtl_433_attic"
# payload: "True"
# value_template: "{{ value_json.model == 'Smoke-GS558' and value_json.id == 13751 and value_json.code == '06b6fd' }}"
# sensor:
# - name: "433 Motion"
# state: "{{ now() }}"
2 changes: 1 addition & 1 deletion ui-lovelace/01-home.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ cards:
- type: markdown
content: |
{% set door_sensors = ['front_door_last','back_porch_door_last','garage_door_last','garage_exterior_door_last','garage_interior_door_last','master_bedroom_exterior_door_last','garage_interior_motion_last','kitchen_motion_last','living_room_motion_last','hallway_motion_last', '433_front_porch_motion_last', 'usps_last'] %}
{% set door_sensors = ['front_door_last','back_porch_door_last','garage_door_last','garage_exterior_door_last','garage_interior_door_last','master_bedroom_exterior_door_last','garage_interior_motion_last','kitchen_motion_last','living_room_motion_last','hallway_motion_last'] %}
{% for door in door_sensors -%}
{%- set seconds = (as_timestamp(now()) - as_timestamp(states('input_datetime.' + door))) | int -%}
{%- set minutes = (seconds // 60) | int -%}
Expand Down

0 comments on commit 676d734

Please sign in to comment.