Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
aneisch committed Sep 15, 2023
1 parent 260643c commit 441e3f3
Show file tree
Hide file tree
Showing 34 changed files with 807 additions and 139 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,10 @@ My Home Assistant installation contains many different components and runs on a
- 2 GE 12730 / ZW4002
- 1 Kwikset 910
- 1 Leviton DZPA1
- 1 None None
- 1 Nortek Security + Control LLC WADWAZ-1
- 1 Nortek Security + Control LLC WAPIRZ-1
- 1 Zooz ZAC36
- 4 Zooz ZEN21
- 5 Zooz ZEN21
- 6 Zooz ZEN27
- 6 Zooz ZEN30
- 2 Zooz ZEN71
Expand All @@ -57,7 +56,7 @@ Also using Grafana/Influx for graphing, both running in Docker containers on NUC
Description | value
-- | --
Lines of ESPHome YAML | 2467
Lines of Home Assistant YAML | 7821
Lines of Home Assistant YAML | 7878
[Integrations](https://www.home-assistant.io/integrations/) in use | 51
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
Expand All @@ -66,7 +65,7 @@ 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 | 99
Entities in the [`binary_sensor`](https://www.home-assistant.io/components/binary_sensor) domain | 126
Entities in the [`binary_sensor`](https://www.home-assistant.io/components/binary_sensor) domain | 132
Entities in the [`button`](https://www.home-assistant.io/components/button) domain | 12
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 | 18
Expand All @@ -91,17 +90,17 @@ 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 | 377
Entities in the [`sensor`](https://www.home-assistant.io/components/sensor) domain | 378
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 | 151
Entities in the [`switch`](https://www.home-assistant.io/components/switch) domain | 152
Entities in the [`timer`](https://www.home-assistant.io/components/timer) domain | 2
Entities in the [`tts`](https://www.home-assistant.io/components/tts) domain | 1
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** | **1024**
**Total state objects** | **1032**
## The HACS integrations/plugins that I use:
**Appdaemon**:<br>
[aneisch/follow_me_appdaemon](https://github.com/aneisch/follow_me_appdaemon)<br>
Expand Down Expand Up @@ -131,6 +130,7 @@ Entities in the [`zone`](https://www.home-assistant.io/components/zone) domain |
[moralmunky/Home-Assistant-Mail-And-Packages](https://github.com/moralmunky/Home-Assistant-Mail-And-Packages)<br>
[rospogrigio/localtuya](https://github.com/rospogrigio/localtuya)<br>
[rroller/dahua](https://github.com/rroller/dahua)<br>
[sdrapha/home-assistant-custom-components-pfsense-gateways](https://github.com/sdrapha/home-assistant-custom-components-pfsense-gateways)<br>
[sebr/bhyve-home-assistant](https://github.com/sebr/bhyve-home-assistant)<br>
[ualex73/monitor_docker](https://github.com/ualex73/monitor_docker)<br>

Expand Down
74 changes: 58 additions & 16 deletions automations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,6 @@
- service: homeassistant.turn_off
entity_id: switch.nexus_7_screen


- alias: "Master Closet Light with Motion"
id: "closet_motion_light"
trigger:
Expand All @@ -450,35 +449,60 @@
- alias: "Sensor Battery Alerts"
id: "sensor_battery_alert"
trigger:
- platform: state
id: binary
from: "off"
to: "on"
entity_id:
- binary_sensor.flume_sensor_home_battery
- binary_sensor.compost_battery
- binary_sensor.433_weather_battery
- binary_sensor.deep_freeze_battery
- platform: numeric_state
id: value
entity_id:
# smoke alarm batteries handled in smoke_alarms.yaml
# b-hyve
- sensor.1_battery_level
- sensor.2_battery_level
- sensor.3_battery_level
# remotes
- sensor.back_bedroom_remote_battery_level
- sensor.guest_bedroom_remote_battery_level
# doors
- sensor.front_door_battery
- sensor.back_door_battery
- sensor.garage_exterior_door_battery_level
# water detectors
- sensor.back_bathroom_toilet_water_detector_battery_level
- sensor.guest_bathroom_toilet_water_detector_battery_level
- sensor.master_bathroom_water_detector_battery_level
- sensor.washing_machine_water_detector_battery_level
- sensor.kitchen_sink_water_detector_battery_level
- sensor.fridge_water_detector_battery_level
# motion sensors
- sensor.motion_1_battery_level
- sensor.living_room_motion_battery_level
- sensor.hallway_motion_battery
- sensor.master_closet_motion_battery_level
# blinds
- sensor.office_blind_left_battery
- sensor.office_blind_right_battery
- sensor.guest_bedroom_blind_left_battery
- sensor.guest_bedroom_blind_right_battery
- sensor.hallway_motion_battery
- sensor.master_closet_motion_battery_level
# temperature sensors
- sensor.netatmo_home_attic_battery_percent
- sensor.fridge_water_detector_battery_level
- sensor.netatmo_home_home_rain_battery_percent
below: 10
action:
- service: script.notify_wrapper
data:
message: "{{ trigger.to_state.name }} battery level at {{ trigger.to_state.state }}%"
message: >
{% if trigger.id == "value" %}
{{ trigger.to_state.name }} battery level at {{ trigger.to_state.state }}%
{% elif trigger.id == "binary" %}
{{ trigger.to_state.name }} battery level low!
{% endif %}
- alias: "Update CloudFlare Firewall Rule"
id: "update_cloudflare_firewall_rule"
Expand Down Expand Up @@ -524,22 +548,40 @@
entity_id: binary_sensor.internet_reachability
from: "on"
to: "off"
id: binary
- platform: state
entity_id: binary_sensor.internet_reachability
from: "off"
to: "on"
id: binary
- platform: state
id: gateway
entity_id: sensor.pfsense_gateway_wan_dhcp
from: "True"
to: "False"
action:
- service: notify.cellular_message
data:
message: >
{% if trigger.from_state.state == "on" %}
Home internet is down
{% else %}
Home internet has recovered
{% endif %}
data:
# Override DND if Daytime, otherwise silent
priority: "{% if now().hour > 9 and now().hour < 22 %}1{% else %}0{% endif %}"
- if: "{{ trigger.id == 'binary' }}"
then:
- service: notify.cellular_message
data:
message: >
{% if trigger.from_state.state == "on" %}
Home internet is down
{% else %}
Home internet has recovered
{% endif %}
data:
# Override DND if Daytime, otherwise silent
priority: "{% if now().hour > 9 and now().hour < 22 %}1{% else %}0{% endif %}"
- if: "{{ trigger.id == 'gateway' }}"
then:
- service: notify.cellular_message
data:
message: >
PFSense gateway down!
data:
# Override DND if Daytime, otherwise silent
priority: "{% if now().hour > 9 and now().hour < 22 %}1{% else %}0{% endif %}"

# - id: webhook_debugger
# alias: "Webhook Debugger"
Expand Down
5 changes: 5 additions & 0 deletions custom_components/alexa_media/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,12 @@
CONF_INCLUDE_DEVICES,
CONF_OAUTH,
CONF_OTPSECRET,
CONF_PUBLIC_URL,
CONF_QUEUE_DELAY,
DATA_ALEXAMEDIA,
DATA_LISTENER,
DEFAULT_EXTENDED_ENTITY_DISCOVERY,
DEFAULT_PUBLIC_URL,
DEFAULT_QUEUE_DELAY,
DEPENDENT_ALEXA_COMPONENTS,
DOMAIN,
Expand Down Expand Up @@ -290,6 +292,9 @@ async def login_success(event=None) -> None:
CONF_QUEUE_DELAY: config_entry.options.get(
CONF_QUEUE_DELAY, DEFAULT_QUEUE_DELAY
),
CONF_PUBLIC_URL: config_entry.options.get(
CONF_PUBLIC_URL, DEFAULT_PUBLIC_URL
),
CONF_EXTENDED_ENTITY_DISCOVERY: config_entry.options.get(
CONF_EXTENDED_ENTITY_DISCOVERY, DEFAULT_EXTENDED_ENTITY_DISCOVERY
),
Expand Down
8 changes: 8 additions & 0 deletions custom_components/alexa_media/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,13 @@
CONF_OAUTH,
CONF_OTPSECRET,
CONF_PROXY_WARNING,
CONF_PUBLIC_URL,
CONF_QUEUE_DELAY,
CONF_SECURITYCODE,
CONF_TOTP_REGISTER,
DATA_ALEXAMEDIA,
DEFAULT_EXTENDED_ENTITY_DISCOVERY,
DEFAULT_PUBLIC_URL,
DEFAULT_QUEUE_DELAY,
DOMAIN,
ISSUE_URL,
Expand Down Expand Up @@ -797,6 +799,12 @@ async def async_step_init(self, user_input=None):
CONF_QUEUE_DELAY, DEFAULT_QUEUE_DELAY
),
): vol.All(vol.Coerce(float), vol.Clamp(min=0)),
vol.Optional(
CONF_PUBLIC_URL,
default=self.config_entry.options.get(
CONF_PUBLIC_URL, DEFAULT_PUBLIC_URL
),
): str,
vol.Required(
CONF_EXTENDED_ENTITY_DISCOVERY,
default=self.config_entry.options.get(
Expand Down
4 changes: 4 additions & 0 deletions custom_components/alexa_media/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
CONF_INCLUDE_DEVICES = "include_devices"
CONF_EXCLUDE_DEVICES = "exclude_devices"
CONF_QUEUE_DELAY = "queue_delay"
CONF_PUBLIC_URL = "public_url"
CONF_EXTENDED_ENTITY_DISCOVERY = "extended_entity_discovery"
CONF_SECURITYCODE = "securitycode"
CONF_OTPSECRET = "otp_secret"
Expand All @@ -59,6 +60,7 @@

DEFAULT_EXTENDED_ENTITY_DISCOVERY = False
DEFAULT_QUEUE_DELAY = 1.5
DEFAULT_PUBLIC_URL = ""
SERVICE_CLEAR_HISTORY = "clear_history"
SERVICE_UPDATE_LAST_CALLED = "update_last_called"
SERVICE_FORCE_LOGOUT = "force_logout"
Expand Down Expand Up @@ -131,3 +133,5 @@
"Alexa.AirQuality.IndoorAirQuality": "mdi:numeric",
}
ALEXA_ICON_DEFAULT = "mdi:molecule"

UPLOAD_PATH = "/config/www/alexa_tts"
Loading

0 comments on commit 441e3f3

Please sign in to comment.