Skip to content

Commit bd29a9d

Browse files
committed
Changes
1 parent e3ed7cc commit bd29a9d

File tree

174 files changed

+4797
-1578
lines changed

Some content is hidden

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

174 files changed

+4797
-1578
lines changed

README.md

Lines changed: 9 additions & 9 deletions
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-2026.1.3%20(Latest)-brightgreen)](https://github.com/home-assistant/home-assistant/releases/latest)
6+
[![HA Version](https://img.shields.io/badge/Running%20Home%20Assistant-2026.2.1%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,16 +57,16 @@ Home Assistant and other containers have ingress handled automatically by [Traef
5757
## Some statistics about my installation:
5858
Description | value
5959
-- | --
60-
Lines of ESPHome YAML | 6014
61-
Lines of Home Assistant YAML | 12505
60+
Lines of ESPHome YAML | 6017
61+
Lines of Home Assistant YAML | 12716
6262
[Integrations](https://www.home-assistant.io/integrations/) in use | 77
63-
Zigbee devices in [`zha`](https://www.home-assistant.io/integrations/zha/) | 26
63+
Zigbee devices in [`zha`](https://www.home-assistant.io/integrations/zha/) |
6464
Z-Wave devices in [`zwave_js`](https://www.home-assistant.io/integrations/zwave_js/) | 37
6565

6666
Description | value
6767
-- | --
6868
Entities in the [`ai_task`](https://www.home-assistant.io/components/ai_task) domain | 2
69-
Entities in the [`automation`](https://www.home-assistant.io/components/automation) domain | 143
69+
Entities in the [`automation`](https://www.home-assistant.io/components/automation) domain | 144
7070
Entities in the [`binary_sensor`](https://www.home-assistant.io/components/binary_sensor) domain | 183
7171
Entities in the [`button`](https://www.home-assistant.io/components/button) domain | 72
7272
Entities in the [`calendar`](https://www.home-assistant.io/components/calendar) domain | 1
@@ -95,22 +95,22 @@ Entities in the [`number`](https://www.home-assistant.io/components/number) doma
9595
Entities in the [`person`](https://www.home-assistant.io/components/person) domain | 2
9696
Entities in the [`plant`](https://www.home-assistant.io/components/plant) domain | 1
9797
Entities in the [`remote`](https://www.home-assistant.io/components/remote) domain | 5
98-
Entities in the [`script`](https://www.home-assistant.io/components/script) domain | 57
98+
Entities in the [`script`](https://www.home-assistant.io/components/script) domain | 58
9999
Entities in the [`select`](https://www.home-assistant.io/components/select) domain | 14
100-
Entities in the [`sensor`](https://www.home-assistant.io/components/sensor) domain | 721
100+
Entities in the [`sensor`](https://www.home-assistant.io/components/sensor) domain | 731
101101
Entities in the [`setter`](https://www.home-assistant.io/components/setter) domain | 1
102102
Entities in the [`siren`](https://www.home-assistant.io/components/siren) domain | 2
103103
Entities in the [`stt`](https://www.home-assistant.io/components/stt) domain | 1
104104
Entities in the [`sun`](https://www.home-assistant.io/components/sun) domain | 1
105-
Entities in the [`switch`](https://www.home-assistant.io/components/switch) domain | 218
105+
Entities in the [`switch`](https://www.home-assistant.io/components/switch) domain | 208
106106
Entities in the [`text`](https://www.home-assistant.io/components/text) domain | 2
107107
Entities in the [`timer`](https://www.home-assistant.io/components/timer) domain | 6
108108
Entities in the [`tts`](https://www.home-assistant.io/components/tts) domain | 2
109109
Entities in the [`update`](https://www.home-assistant.io/components/update) domain | 90
110110
Entities in the [`vacuum`](https://www.home-assistant.io/components/vacuum) domain | 1
111111
Entities in the [`weather`](https://www.home-assistant.io/components/weather) domain | 1
112112
Entities in the [`zone`](https://www.home-assistant.io/components/zone) domain | 8
113-
**Total state objects** | **1833**
113+
**Total state objects** | **1835**
114114
## The HACS integrations/plugins that I use:
115115

116116
**Appdaemon**:<br>

alexa.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ smart_home:
9898
- switch.ir_candles
9999
- input_boolean.kitchen_motion
100100
- script.surround_mute
101+
- script.too
101102
#############
102103
# Christmas #
103104
#############

automations.yaml

Lines changed: 71 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -670,18 +670,6 @@
670670
data:
671671
meter_entity: sensor.electricity_sell_offset
672672
cycle_reset_entity_id: sensor.utilities_cycle_end
673-
- alias: Update USPS Mail Camera Path on Hass Restart
674-
id: usps_mail_path_update
675-
trigger:
676-
- platform: state
677-
entity_id: sensor.mail_updated
678-
- platform: homeassistant
679-
event: start
680-
action:
681-
- action: local_file.update_file_path
682-
data_template:
683-
entity_id: camera.mail_usps
684-
file_path: '{{ states(''sensor.mail_image_system_path'') }}'
685673
- id: fingerprint_door_unlock
686674
alias: Fingerprint Door Unlock
687675
description: ''
@@ -1501,3 +1489,74 @@
15011489
data:
15021490
message: Thermostat mode changed to {{ trigger.to_state.state }}
15031491
mode: single
1492+
- id: '1770674039807'
1493+
alias: Log Utility Bill Costs
1494+
description: ''
1495+
triggers:
1496+
- trigger: state
1497+
entity_id:
1498+
- sensor.latest_utility_bill_id
1499+
conditions:
1500+
- condition: template
1501+
value_template: '{{ trigger.to_state not in ["unknown", "unavailable"] }}'
1502+
actions:
1503+
- action: google_sheets.append_sheet
1504+
metadata: {}
1505+
data:
1506+
config_entry: 01JYQN4AYGRQ9S6WQBJV4T4CBW
1507+
worksheet: Utility Bill History
1508+
data:
1509+
Bill Date: '{{ state_attr(''sensor.latest_utility_bill_id'',''date'') }}'
1510+
Cycle Start: '{{ state_attr(''sensor.latest_utility_bill_id'',''minDate'')
1511+
}}'
1512+
Cycle End: '{{ state_attr(''sensor.latest_utility_bill_id'',''maxDate'') }}'
1513+
Bill ID: '{{ states(''sensor.latest_utility_bill_id'') }}'
1514+
Total: '{{ state_attr(''sensor.latest_utility_bill_id'',''amount'') }}'
1515+
Drainage: '{{ float(states(''sensor.latest_utility_bill_drainage_cost'', rounded=True),
1516+
default=0) }}'
1517+
Electric: '{{ float(states(''sensor.latest_utility_bill_electric_cost'', rounded=True),
1518+
default=0) }}'
1519+
Roadway Maintenance: '{{ float(states(''sensor.latest_utility_bill_roadway_maintenance_cost'',
1520+
rounded=True), default=0) }}'
1521+
Solid Waste: '{{ float(states(''sensor.latest_utility_bill_solid_waste_cost'',
1522+
rounded=True), default=0) }}'
1523+
Water: '{{ float(states(''sensor.latest_utility_bill_water_cost'', rounded=True),
1524+
default=0) }}'
1525+
Wastewater: '{{ float(states(''sensor.latest_utility_bill_wastewater_cost'',
1526+
rounded=True), default=0) }}'
1527+
add_created_column: false
1528+
- action: notify.signal_homeassistant
1529+
metadata: {}
1530+
data:
1531+
data:
1532+
text_mode: styled
1533+
message: "Utility Bill Issued:\n**Bill Date**: {{ state_attr('sensor.latest_utility_bill_id','date')
1534+
}}\n**Cycle Start**: {{ state_attr('sensor.latest_utility_bill_id','minDate')
1535+
}}\n**Cycle End**: {{ state_attr('sensor.latest_utility_bill_id','maxDate')
1536+
}}\n**Total**: {{ state_attr('sensor.latest_utility_bill_id','amount') }}\n**Drainage**:
1537+
{{ float(states('sensor.latest_utility_bill_drainage_cost', rounded=True),\n
1538+
\ default=0) }}\n**Electric**: {{ float(states('sensor.latest_utility_bill_electric_cost',
1539+
rounded=True),\n default=0) }}\n**Roadway Maintenance**: {{ float(states('sensor.latest_utility_bill_roadway_maintenance_cost',\n
1540+
\ rounded=True), default=0) }}\n**Solid Waste**: {{ float(states('sensor.latest_utility_bill_solid_waste_cost',
1541+
rounded=True),\n default=0) }}\n**Water**: {{ float(states('sensor.latest_utility_bill_water_cost',
1542+
rounded=True),\n default=0) }}\n**Wastewater**: {{ float(states('sensor.latest_utility_bill_wastewater_cost',
1543+
rounded=True),\n default=0) }}"
1544+
mode: single
1545+
- id: '1770749639367'
1546+
alias: Tesla Alert
1547+
description: ''
1548+
triggers:
1549+
- trigger: state
1550+
entity_id:
1551+
- sensor.tesla_state
1552+
from:
1553+
- online
1554+
conditions:
1555+
- condition: template
1556+
value_template: '{{ trigger.to_state.state not in ["charging"] }}'
1557+
actions:
1558+
- action: notify.signal_self
1559+
metadata: {}
1560+
data:
1561+
message: Tesla Status Change
1562+
mode: single

binary_sensor.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@
1919
# count: 3
2020
# scan_interval: 10
2121

22-
- platform: template
23-
sensors:
24-
# On if both backups < 10 minutes ago
25-
backups_complete:
26-
value_template: "{{ (as_timestamp(now()) - as_timestamp(states('sensor.last_vps_backup_completed'))) < 600 and (as_timestamp(now()) - as_timestamp(states('sensor.last_nuc_backup_completed'))) < 600 }}"
27-
# andrew_phone_watch_connected:
28-
# value_template: "{{ 'AC:80:FB:99:B2:AA (Galaxy Watch6 (KQBW))' in state_attr('sensor.andrew_phone_bluetooth_connection','connected_paired_devices') }}"
29-
# andrew_phone_car_connected:
30-
# value_template: "{{ '00:0A:30:D7:D5:56 (Mazda)' in state_attr('sensor.andrew_phone_bluetooth_connection','connected_paired_devices') }}"
22+
# - platform: template
23+
# sensors:
24+
# # On if both backups < 10 minutes ago
25+
# backups_complete:
26+
# value_template: "{{ (as_timestamp(now()) - as_timestamp(states('sensor.last_vps_backup_completed'))) < 600 and (as_timestamp(now()) - as_timestamp(states('sensor.last_nuc_backup_completed'))) < 600 }}"
27+
# # andrew_phone_watch_connected:
28+
# # value_template: "{{ 'AC:80:FB:99:B2:AA (Galaxy Watch6 (KQBW))' in state_attr('sensor.andrew_phone_bluetooth_connection','connected_paired_devices') }}"
29+
# # andrew_phone_car_connected:
30+
# # value_template: "{{ '00:0A:30:D7:D5:56 (Mazda)' in state_attr('sensor.andrew_phone_bluetooth_connection','connected_paired_devices') }}"

configuration.yaml

Lines changed: 4 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ homeassistant:
2828
blinds: !include packages/blinds.yaml
2929
hass_update_check: !include packages/hass_update_check.yaml
3030
smoke_alarms: !include packages/smoke_alarms.yaml
31-
magic_cube: !include packages/magic_cube.yaml
31+
# magic_cube: !include packages/magic_cube.yaml
3232
irrigation: !include packages/irrigation.yaml
3333
leak_detection: !include packages/leak_detection.yaml
3434
reminders: !include packages/reminders.yaml
@@ -239,23 +239,6 @@ light:
239239
- light.front_sconces
240240
- light.front_porch_lights
241241

242-
lock:
243-
- platform: template
244-
name: All Doors
245-
value_template: "{{ is_state('lock.front_door','locked') and is_state('lock.back_door','locked') and is_state('lock.garage_exterior_door','locked') }}"
246-
lock:
247-
- service: lock.lock
248-
entity_id:
249-
- lock.front_door
250-
- lock.back_door
251-
- lock.garage_exterior_door
252-
unlock:
253-
- service: lock.unlock
254-
entity_id:
255-
- lock.front_door
256-
- lock.back_door
257-
- lock.garage_exterior_door
258-
259242
logbook:
260243

261244
logger:
@@ -463,9 +446,10 @@ readme:
463446
# states_meta.entity_id
464447
# ORDER BY
465448
# COUNT(*) DESC;
449+
# https://www.home-assistant.io/integrations/recorder/#mariadb-and-mysql
466450
recorder:
467451
db_url: mysql://homeassistant:homeassistant@127.0.0.1/homeassistant?charset=utf8mb4
468-
purge_keep_days: 182
452+
purge_keep_days: 90
469453
commit_interval: 30
470454
exclude:
471455
entities:
@@ -513,28 +497,7 @@ recorder:
513497
- media_player.kitchen_photo_frame
514498
- media_player.office_photo_frame
515499

516-
rest:
517-
- resource: !secret utilities_rest_url
518-
method: POST
519-
payload: !secret utilities_rest_payload
520-
verify_ssl: false
521-
# 6 Hours
522-
scan_interval: 21600
523-
headers:
524-
Content-Type: application/x-www-form-urlencoded
525-
sensor:
526-
- name: "Utilities Cycle Start"
527-
value_template: "{{ value_json.ReadStartDate }}"
528-
icon: 'mdi:calendar'
529-
json_attributes:
530-
- StartDateLabel
531-
- EndDateLabel
532-
- name: "Utilities Cycle End"
533-
value_template: "{{ value_json.ReadEndDate }}"
534-
icon: 'mdi:calendar'
535-
json_attributes:
536-
- StartDateLabel
537-
- EndDateLabel
500+
rest: !include rest.yaml
538501

539502
rest_command: !include rest_command.yaml
540503

custom_components/alexa_media/__init__.py

Lines changed: 42 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
from homeassistant.data_entry_flow import UnknownFlow
4848
from homeassistant.exceptions import ConfigEntryNotReady
4949
from homeassistant.helpers import config_validation as cv, device_registry as dr
50+
from homeassistant.helpers.debounce import Debouncer
5051
from homeassistant.helpers.discovery import async_load_platform
5152
from homeassistant.helpers.dispatcher import async_dispatcher_send
5253
from homeassistant.helpers.issue_registry import IssueSeverity, async_create_issue
@@ -495,22 +496,32 @@ async def async_update_data() -> Optional[AlexaEntityData]:
495496
# Backwards compat if some installs still have a single sensor stored
496497
entities_to_monitor.add(airq.alexa_entity_id)
497498

498-
for light in hass.data[DATA_ALEXAMEDIA]["accounts"][email]["entities"]["light"]:
499+
for light in hass.data[DATA_ALEXAMEDIA]["accounts"][email]["entities"].get(
500+
"light", []
501+
):
499502
if light.enabled:
500503
entities_to_monitor.add(light.alexa_entity_id)
501504

502-
for binary_sensor in hass.data[DATA_ALEXAMEDIA]["accounts"][email]["entities"][
503-
"binary_sensor"
504-
]:
505+
for binary_sensor in hass.data[DATA_ALEXAMEDIA]["accounts"][email][
506+
"entities"
507+
].get("binary_sensor", []):
505508
if binary_sensor.enabled:
506509
entities_to_monitor.add(binary_sensor.alexa_entity_id)
507510

508-
for guard in hass.data[DATA_ALEXAMEDIA]["accounts"][email]["entities"][
509-
"alarm_control_panel"
510-
].values():
511+
for guard in (
512+
hass.data[DATA_ALEXAMEDIA]["accounts"][email]["entities"]
513+
.get("alarm_control_panel", {})
514+
.values()
515+
):
511516
if guard.enabled:
512517
entities_to_monitor.add(guard.unique_id)
513518

519+
for smart_switch in hass.data[DATA_ALEXAMEDIA]["accounts"][email][
520+
"entities"
521+
].get("smart_switch", []):
522+
if smart_switch.enabled:
523+
entities_to_monitor.add(smart_switch.alexa_entity_id)
524+
514525
if entities_to_monitor:
515526
tasks.append(get_entity_data(login_obj, list(entities_to_monitor)))
516527

@@ -557,7 +568,12 @@ async def async_update_data() -> Optional[AlexaEntityData]:
557568
optional_task_results.pop()
558569
entities_to_monitor.clear()
559570

560-
alexa_entities = parse_alexa_entities(api_devices)
571+
alexa_entities = parse_alexa_entities(
572+
api_devices,
573+
debug=hass.data[DATA_ALEXAMEDIA]["accounts"][email][
574+
"options"
575+
].get(CONF_DEBUG, False),
576+
)
561577
hass.data[DATA_ALEXAMEDIA]["accounts"][email]["devices"].update(
562578
alexa_entities
563579
)
@@ -1714,6 +1730,15 @@ async def http2_error_handler(message):
17141730
coordinator.update_interval = timedelta(
17151731
seconds=scan_interval * 10 if http2_enabled else scan_interval
17161732
)
1733+
account = hass.data[DATA_ALEXAMEDIA]["accounts"][email]
1734+
if "confirm_refresh_debouncer" not in account:
1735+
account["confirm_refresh_debouncer"] = Debouncer(
1736+
hass,
1737+
_LOGGER,
1738+
cooldown=2.0,
1739+
immediate=False,
1740+
function=coordinator.async_request_refresh,
1741+
)
17171742
# Fetch initial data so we have data when entities subscribe
17181743
_LOGGER.debug("%s: setup_alexa: Refreshing coordinator", hide_email(email))
17191744
await coordinator.async_refresh()
@@ -1762,6 +1787,15 @@ async def async_unload_entry(hass, entry) -> bool:
17621787
)
17631788
hass.data[DATA_ALEXAMEDIA]["accounts"][email]["last_called_probe_task"] = None
17641789

1790+
debouncer = hass.data[DATA_ALEXAMEDIA]["accounts"][email].get(
1791+
"confirm_refresh_debouncer"
1792+
)
1793+
if debouncer:
1794+
debouncer.async_cancel()
1795+
hass.data[DATA_ALEXAMEDIA]["accounts"][email][
1796+
"confirm_refresh_debouncer"
1797+
] = None
1798+
17651799
for component in ALEXA_COMPONENTS + DEPENDENT_ALEXA_COMPONENTS:
17661800
try:
17671801
if component == "notify":

0 commit comments

Comments
 (0)