Skip to content

Commit 9e8ec74

Browse files
committed
Updates
1 parent 0d81a2b commit 9e8ec74

File tree

159 files changed

+4307
-80
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

159 files changed

+4307
-80
lines changed

β€ŽREADME.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![Build Status](https://github.com/aneisch/home-assistant-config/actions/workflows/check-ha-release-compatibility.yml/badge.svg)](https://github.com/aneisch/home-assistant-config/actions)
44
[![GitHub last commit](https://img.shields.io/github/last-commit/aneisch/home-assistant-config)](https://github.com/aneisch/home-assistant-config/commits/master)
55
[![GitHub commit activity](https://img.shields.io/github/commit-activity/y/aneisch/home-assistant-config)](https://github.com/aneisch/home-assistant-config/graphs/commit-activity)
6-
[![HA Version](https://img.shields.io/badge/Running%20Home%20Assistant-2025.3.3%20(Latest)-brightgreen)](https://github.com/home-assistant/home-assistant/releases/latest)
6+
[![HA Version](https://img.shields.io/badge/Running%20Home%20Assistant-2025.3.4%20(Latest)-brightgreen)](https://github.com/home-assistant/home-assistant/releases/latest)
77
<br><a href="https://www.buymeacoffee.com/aneisch" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-black.png" width="150px" height="35px" alt="Buy Me A Coffee" style="height: 35px !important;width: 150px !important;" ></a>
88

99
I do my best to keep [Home Assistant](https://github.com/home-assistant/home-assistant) on the [latest release](https://github.com/home-assistant/home-assistant/releases/latest). I'm heavily utilizing [AppDaemon](http://appdaemon.readthedocs.io/en/latest/) and [NodeRed](https://flows.nodered.org/node/node-red-contrib-home-assistant-websocket) for advanced/templated automations. See [Appdaemon config](https://github.com/aneisch/home-assistant-config/tree/master/extras/appdaemon) and my NodeRed screenshots below for details. Most of my setup is run as Docker containers (see [docker-compose](https://github.com/aneisch/home-assistant-config/tree/master/extras/docker-compose) for container list).
@@ -57,15 +57,15 @@ Home Assistant and other containers have ingress handled automatically by [Traef
5757
Description | value
5858
-- | --
5959
Lines of ESPHome YAML | 3370
60-
Lines of Home Assistant YAML | 11071
60+
Lines of Home Assistant YAML | 11099
6161
[Integrations](https://www.home-assistant.io/integrations/) in use | 68
6262
Zigbee devices in [`zha`](https://www.home-assistant.io/integrations/zha/) | 26
6363
Z-Wave devices in [`zwave_js`](https://www.home-assistant.io/integrations/zwave_js/) | 37
6464

6565
Description | value
6666
-- | --
6767
Entities in the [`assist_satellite`](https://www.home-assistant.io/components/assist_satellite) domain | 1
68-
Entities in the [`automation`](https://www.home-assistant.io/components/automation) domain | 141
68+
Entities in the [`automation`](https://www.home-assistant.io/components/automation) domain | 142
6969
Entities in the [`binary_sensor`](https://www.home-assistant.io/components/binary_sensor) domain | 179
7070
Entities in the [`button`](https://www.home-assistant.io/components/button) domain | 68
7171
Entities in the [`camera`](https://www.home-assistant.io/components/camera) domain | 16
@@ -107,7 +107,7 @@ Entities in the [`update`](https://www.home-assistant.io/components/update) doma
107107
Entities in the [`vacuum`](https://www.home-assistant.io/components/vacuum) domain | 1
108108
Entities in the [`weather`](https://www.home-assistant.io/components/weather) domain | 1
109109
Entities in the [`zone`](https://www.home-assistant.io/components/zone) domain | 8
110-
**Total state objects** | **1676**
110+
**Total state objects** | **1677**
111111
## The HACS integrations/plugins that I use:
112112

113113
**Appdaemon**:<br>

β€Žcustom_components/dahua/__init__.py

-10
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,6 @@
5050

5151
_LOGGER: logging.Logger = logging.getLogger(__package__)
5252

53-
54-
async def async_setup(hass: HomeAssistant, config: ConfigType):
55-
"""
56-
Set up this integration with the UI. YAML is not supported.
57-
https://developers.home-assistant.io/docs/asyncio_working_with_async/
58-
"""
59-
hass.data.setdefault(DOMAIN, {})
60-
return True
61-
62-
6353
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):
6454
"""Set up this integration using UI."""
6555
if hass.data.get(DOMAIN) is None:

β€Žcustom_components/dahua/client.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
from .digest import DigestAuth
99
from hashlib import md5
10+
from urllib.parse import quote
1011

1112
_LOGGER: logging.Logger = logging.getLogger(__package__)
1213

@@ -47,8 +48,8 @@ def get_rtsp_stream_url(self, channel: int, subtype: int) -> str:
4748
Returns the RTSP url for the supplied subtype (subtype is 0=Main stream, 1=Sub stream)
4849
"""
4950
url = "rtsp://{0}:{1}@{2}:{3}/cam/realmonitor?channel={4}&subtype={5}".format(
50-
self._username,
51-
self._password,
51+
quote(self._username),
52+
quote(self._password),
5253
self._address,
5354
self._rtsp_port,
5455
channel,
@@ -743,7 +744,7 @@ async def stream_events(self, on_receive, events: list, channel: int):
743744
async for data, _ in response.content.iter_chunks():
744745
on_receive(data, channel)
745746
except Exception as exception:
746-
pass
747+
_LOGGER.exception(exception)
747748
finally:
748749
if response is not None:
749750
response.close()
+6-7
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
{
22
"domain": "dahua",
33
"name": "Dahua",
4-
"iot_class": "local_polling",
5-
"documentation": "https://github.com/rroller/dahua",
6-
"issue_tracker": "https://github.com/rroller/dahua/issues",
7-
"dependencies": [],
8-
"version": "0.9.71",
9-
"config_flow": true,
4+
"after_dependencies": ["tag"],
105
"codeowners": [
116
"@rroller"
127
],
13-
"requirements": []
8+
"config_flow": true,
9+
"documentation": "https://github.com/rroller/dahua",
10+
"iot_class": "local_polling",
11+
"issue_tracker": "https://github.com/rroller/dahua/issues",
12+
"version": "0.9.72"
1413
}

β€Žcustom_components/dahua/services.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ set_infrared_mode:
1010
domain: camera
1111
fields:
1212
mode:
13+
name: Mode
1314
description: "The infrared mode: Auto, On, Off"
1415
example: "Auto"
1516
default: "Auto"
@@ -20,6 +21,7 @@ set_infrared_mode:
2021
- "On"
2122
- "Off"
2223
brightness:
24+
name: Brightness
2325
description: The infrared brightness, from 0 to 100 inclusive. 100 is the brightest
2426
example: 100
2527
default: 100
@@ -40,6 +42,7 @@ set_video_profile_mode:
4042
domain: camera
4143
fields:
4244
mode:
45+
name: Mode
4346
description: "The profile: Day, Night"
4447
example: "Day"
4548
selector:
@@ -266,6 +269,7 @@ set_video_in_day_night_mode:
266269
domain: camera
267270
fields:
268271
config_type:
272+
name: Config Type
269273
description: "The config type: general, day, night"
270274
example: "general"
271275
default: "general"
@@ -276,6 +280,7 @@ set_video_in_day_night_mode:
276280
- "day"
277281
- "night"
278282
mode:
283+
name: Mode
279284
description: "The mode: Auto, Color, BlackWhite. Note Auto is also known as Brightness by Dahua"
280285
example: "Auto"
281286
default: "Auto"
@@ -303,6 +308,7 @@ set_record_mode:
303308
domain: camera
304309
fields:
305310
mode:
311+
name: Mode
306312
description: "The mode: Auto, On, Off"
307313
example: "Auto"
308314
default: "Auto"

β€Žimages/nodered_1.png

0 Bytes
Loading

β€Žimages/nodered_2.png

0 Bytes
Loading

β€Žpackages/frigate.yaml

+11-11
Original file line numberDiff line numberDiff line change
@@ -538,17 +538,17 @@ automation:
538538
data:
539539
camera: bullet
540540

541-
# - alias: Frigate Daily Restart
542-
# id: "frigate_restart"
543-
# trigger:
544-
# platform: time
545-
# at: "09:00:00"
546-
# action:
547-
# - action: mqtt.publish
548-
# data:
549-
# qos: 0
550-
# retain: false
551-
# topic: frigate/restart
541+
- alias: Frigate Daily Restart
542+
id: "frigate_restart"
543+
trigger:
544+
platform: time
545+
at: "09:00:00"
546+
action:
547+
- action: mqtt.publish
548+
data:
549+
qos: 0
550+
retain: false
551+
topic: frigate/restart
552552

553553
- alias: Frigate Healthcheck
554554
id: "frigate_healthcheck"

β€Žpackages/tesla.yaml

+72-43
Original file line numberDiff line numberDiff line change
@@ -656,52 +656,81 @@ automation:
656656
# %} {% endif %} {% if 'query' in trigger and trigger.query|length > 0 %}\n
657657
# \ Query: {{ dict(trigger.query)|tojson }}\n{% endif %}"
658658

659-
# This allows TeslaUSB backup to complete (sentry mode on by default at home keeps the Pi powered)
660-
# turn off after 15 minutes to allow backup to complete
661-
- alias: Disable Sentry Mode for TeslaUSB
662-
id: disable_sentry_mode_for_teslausb
659+
- alias: "Tesla Tire Pressure Check on Park"
663660
trigger:
664661
- platform: state
665-
entity_id: device_tracker.tesla_location
666-
from: "not_home"
667-
to: "home"
668-
id: location
669-
- platform: webhook
670-
webhook_id: !secret teslausb_webhook
671-
local_only: false
672-
id: webhook
662+
entity_id: sensor.tesla_shift_state
663+
to: "P"
664+
# condition:
665+
# - condition: state
666+
# entity_id: device_tracker.tesla_location
667+
# state: "home"
673668
action:
674-
- if: "{{ trigger.id == 'webhook' }}"
675-
alias: "Webhook"
676-
then:
677-
- choose:
678-
- conditions:
679-
- condition: template
680-
value_template: '{{ ''including'' in trigger.json.value2 }}'
681-
alias: "Started"
682-
sequence:
683-
- action: switch.turn_on
684-
target:
685-
entity_id: switch.tesla_ble_sentry_mode
686-
- conditions:
687-
- condition: template
688-
value_template: '{{ ''completed'' in trigger.json.value2 }}'
689-
alias: "Completed"
690-
sequence:
691-
- action: switch.turn_off
692-
target:
693-
entity_id: switch.tesla_ble_sentry_mode
694-
- if: "{{ trigger.id == 'location' }}"
695-
alias: "Location"
696-
then:
697-
- wait_template: "{{ is_state('binary_sensor.tesla_doors_open', 'on') }}"
698-
timeout: 00:05:00
699-
- action: switch.turn_on
700-
entity_id: switch.tesla_ble_sentry_mode
701-
- delay: "00:05:00"
702-
- action: switch.turn_off
703-
entity_id: switch.tesla_ble_sentry_mode
704-
mode: restart
669+
- service: python_script.tire_pressure_check
670+
671+
- alias: "Tesla BLE Disconnected and Reset Sonoff USB"
672+
trigger:
673+
- platform: state
674+
entity_id: binary_sensor.tesla_ble
675+
to: "off"
676+
for:
677+
minutes: 10
678+
action:
679+
- service: switch.turn_off
680+
target:
681+
entity_id: switch.sonoff_usb_1
682+
- delay:
683+
seconds: 5
684+
- service: switch.turn_on
685+
target:
686+
entity_id: switch.sonoff_usb_1
687+
688+
# This allows TeslaUSB backup to complete (sentry mode on by default at home keeps the Pi powered)
689+
# turn off after 15 minutes to allow backup to complete
690+
# - alias: Disable Sentry Mode for TeslaUSB
691+
# id: disable_sentry_mode_for_teslausb
692+
# trigger:
693+
# - platform: state
694+
# entity_id: device_tracker.tesla_location
695+
# from: "not_home"
696+
# to: "home"
697+
# id: location
698+
# - platform: webhook
699+
# webhook_id: !secret teslausb_webhook
700+
# local_only: false
701+
# id: webhook
702+
# action:
703+
# - if: "{{ trigger.id == 'webhook' }}"
704+
# alias: "Webhook"
705+
# then:
706+
# - choose:
707+
# - conditions:
708+
# - condition: template
709+
# value_template: '{{ ''including'' in trigger.json.value2 }}'
710+
# alias: "Started"
711+
# sequence:
712+
# - action: switch.turn_on
713+
# target:
714+
# entity_id: switch.tesla_ble_sentry_mode
715+
# - conditions:
716+
# - condition: template
717+
# value_template: '{{ ''completed'' in trigger.json.value2 }}'
718+
# alias: "Completed"
719+
# sequence:
720+
# - action: switch.turn_off
721+
# target:
722+
# entity_id: switch.tesla_ble_sentry_mode
723+
# - if: "{{ trigger.id == 'location' }}"
724+
# alias: "Location"
725+
# then:
726+
# - wait_template: "{{ is_state('binary_sensor.tesla_doors_open', 'on') }}"
727+
# timeout: 00:05:00
728+
# - action: switch.turn_on
729+
# entity_id: switch.tesla_ble_sentry_mode
730+
# - delay: "00:05:00"
731+
# - action: switch.turn_off
732+
# entity_id: switch.tesla_ble_sentry_mode
733+
# mode: restart
705734

706735
- alias: "Tesla Charge Limit Change Notice"
707736
id: "tesla_charge_limit_change_notice"
+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Check tire pressure and alert if attetion is needed
2+
3+
inputs = ['sensor.tesla_tpms_pressure_fl', 'sensor.tesla_tpms_pressure_fr', 'sensor.tesla_tpms_pressure_rl', 'sensor.tesla_tpms_pressure_rr']
4+
pressures = []
5+
average_pressure_alert = 40
6+
difference_alert = 2
7+
8+
for tire in inputs:
9+
pressures.append(float(hass.states.get(tire).state))
10+
11+
# Fire event containting max, min, and average pressure
12+
# hass.bus.fire("warn", [max(pressures), min(pressures),sum(pressures) / len(pressures)])
13+
14+
# Alert if pressure difference between highest and lowest is > difference_alert
15+
if max(pressures) - min(pressures) > difference_alert:
16+
hass.bus.fire("warn", [max(pressures), min(pressures), "too big"])
17+
hass.services.call("notify", "signal_homeassistant", {'message': f'''Tesla tire pressure needs attention. Min/Max difference >{difference_alert}psi.
18+
19+
Front Left: {hass.states.get('sensor.tesla_tpms_pressure_fl').state}
20+
Front Right: {hass.states.get('sensor.tesla_tpms_pressure_fr').state}
21+
Rear Left: {hass.states.get('sensor.tesla_tpms_pressure_rl').state}
22+
Rear Right: {hass.states.get('sensor.tesla_tpms_pressure_rr').state}
23+
'''})
24+
25+
# Alert if average pressure is below average_pressure_alert
26+
if sum(pressures) / len(pressures) < average_pressure_alert:
27+
hass.services.call("notify", "signal_homeassistant", {'message': f'''Tesla tire pressure needs attention. Average pressure <{average_pressure_alert}psi
28+
29+
Average: {sum(pressures) / len(pressures)}
30+
Front Left: {hass.states.get('sensor.tesla_tpms_pressure_fl').state}
31+
Front Right: {hass.states.get('sensor.tesla_tpms_pressure_fr').state}
32+
Rear Left: {hass.states.get('sensor.tesla_tpms_pressure_rl').state}
33+
Rear Right: {hass.states.get('sensor.tesla_tpms_pressure_rr').state}
34+
'''})

β€Žui-lovelace/06-car.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ cards:
4545
title: Commands
4646
show_header_toggle: false
4747
entities:
48+
- switch.sonoff_usb_1
4849
- binary_sensor.tesla_ble
4950
- button.tesla_ble_force_update_all
5051
- button.tesla_ble_wake_up_car
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
import"./card-cfbffe2e.js";
1+
import"./card-206decfa.js";
Binary file not shown.
Binary file not shown.

β€Žwww/community/advanced-camera-card/audio-2f3b4e26.js

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Binary file not shown.

β€Žwww/community/advanced-camera-card/audio-62cb96ac.js

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Binary file not shown.

0 commit comments

Comments
Β (0)