diff --git a/README.md b/README.md index a28bb92d..3a7e7815 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![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) [![GitHub last commit](https://img.shields.io/github/last-commit/aneisch/home-assistant-config)](https://github.com/aneisch/home-assistant-config/commits/master) [![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) -[![HA Version](https://img.shields.io/badge/Running%20Home%20Assistant-2024.1.6%20(Latest)-brightgreen)](https://github.com/home-assistant/home-assistant/releases/latest) +[![HA Version](https://img.shields.io/badge/Running%20Home%20Assistant%20-2024.2.0b8%20(Out%20of%20Date)-Red)](https://github.com/home-assistant/home-assistant/releases/latest)
Buy Me A Coffee @@ -57,7 +57,7 @@ Also using Grafana/Influx for graphing, both running in Docker containers on NUC Description | value -- | -- Lines of ESPHome YAML | 2801 -Lines of Home Assistant YAML | 9006 +Lines of Home Assistant YAML | 9050 [Integrations](https://www.home-assistant.io/integrations/) in use | 56 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 @@ -65,9 +65,9 @@ Z-Wave devices in [`zwave_js`](https://www.home-assistant.io/integrations/zwave_ Description | value -- | -- Entities in the [`automation`](https://www.home-assistant.io/components/automation) domain | 117 -Entities in the [`binary_sensor`](https://www.home-assistant.io/components/binary_sensor) domain | 145 +Entities in the [`binary_sensor`](https://www.home-assistant.io/components/binary_sensor) domain | 148 Entities in the [`button`](https://www.home-assistant.io/components/button) domain | 17 -Entities in the [`camera`](https://www.home-assistant.io/components/camera) domain | 13 +Entities in the [`camera`](https://www.home-assistant.io/components/camera) domain | 14 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 | 13 @@ -75,7 +75,7 @@ Entities in the [`device_tracker`](https://www.home-assistant.io/components/devi Entities in the [`event`](https://www.home-assistant.io/components/event) domain | 50 Entities in the [`fan`](https://www.home-assistant.io/components/fan) domain | 3 Entities in the [`group`](https://www.home-assistant.io/components/group) domain | 17 -Entities in the [`image`](https://www.home-assistant.io/components/image) domain | 8 +Entities in the [`image`](https://www.home-assistant.io/components/image) domain | 9 Entities in the [`input_boolean`](https://www.home-assistant.io/components/input_boolean) domain | 28 Entities in the [`input_datetime`](https://www.home-assistant.io/components/input_datetime) domain | 34 Entities in the [`input_number`](https://www.home-assistant.io/components/input_number) domain | 6 @@ -91,17 +91,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 | 55 Entities in the [`select`](https://www.home-assistant.io/components/select) domain | 3 -Entities in the [`sensor`](https://www.home-assistant.io/components/sensor) domain | 397 +Entities in the [`sensor`](https://www.home-assistant.io/components/sensor) domain | 446 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 | 163 +Entities in the [`switch`](https://www.home-assistant.io/components/switch) domain | 167 Entities in the [`timer`](https://www.home-assistant.io/components/timer) domain | 6 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 | 3 +Entities in the [`update`](https://www.home-assistant.io/components/update) domain | 35 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** | **1202** +**Total state objects** | **1292** ## The HACS integrations/plugins that I use: **Appdaemon**:
[aneisch/follow_me_appdaemon](https://github.com/aneisch/follow_me_appdaemon)
diff --git a/custom_components/frigate/manifest.json b/custom_components/frigate/manifest.json index 18aed96a..8105fdcb 100644 --- a/custom_components/frigate/manifest.json +++ b/custom_components/frigate/manifest.json @@ -14,5 +14,5 @@ "iot_class": "local_push", "issue_tracker": "https://github.com/blakeblackshear/frigate-hass-integration/issues", "requirements": ["pytz==2022.7"], - "version": "5.0.0" + "version": "5.0.1" } diff --git a/custom_components/frigate/media_source.py b/custom_components/frigate/media_source.py index 5e39dac5..bf74ab00 100644 --- a/custom_components/frigate/media_source.py +++ b/custom_components/frigate/media_source.py @@ -857,7 +857,7 @@ def _build_event_response( ), media_class=identifier.media_class, media_content_type=identifier.media_type, - title=f"{dt.datetime.fromtimestamp(event['start_time'], DEFAULT_TIME_ZONE).strftime(DATE_STR_FORMAT)} [{duration}s, {event['label'].capitalize()} {int(event['data']['top_score']*100)}%]", + title=f"{dt.datetime.fromtimestamp(event['start_time'], DEFAULT_TIME_ZONE).strftime(DATE_STR_FORMAT)} [{duration}s, {event['label'].capitalize()} {int((event['data'].get('top_score') or event['top_score'])*100)}%]", can_play=identifier.media_type == MEDIA_TYPE_VIDEO, can_expand=False, thumbnail=f"/api/frigate/{identifier.frigate_instance_id}/thumbnail/{event['id']}", diff --git a/custom_components/setter/__init__.py b/custom_components/setter/__init__.py index e7d966db..2b9ed4bd 100644 --- a/custom_components/setter/__init__.py +++ b/custom_components/setter/__init__.py @@ -1,5 +1,4 @@ import logging -import asyncio from homeassistant.core import Context from homeassistant.helpers.restore_state import RestoreEntity @@ -78,13 +77,12 @@ def state_attributes(self): def state(self): return len(self._entities_db) - @asyncio.coroutine - def async_added_to_hass(self): - state = yield from self.async_get_last_state() - if ( - state is not None - and state.attributes is not None - and not isinstance(state.attributes["entities"], list) - and "entities" in state.attributes - ): + + async def async_added_to_hass(self): + state = await self.async_get_last_state() + if state is not None \ + and state.attributes is not None \ + and "variables" in state.attributes and not isinstance(state.attributes["entities"], list) \ + and "entities" in state.attributes and not isinstance(state.attributes["variables"], list): + self._variables_db = state.attributes["variables"] self._entities_db = state.attributes["entities"] diff --git a/extras/docker-compose/homeassistant/docker-compose.yml b/extras/docker-compose/homeassistant/docker-compose.yml index 0b402ad9..fbea7892 100644 --- a/extras/docker-compose/homeassistant/docker-compose.yml +++ b/extras/docker-compose/homeassistant/docker-compose.yml @@ -2,7 +2,7 @@ version: '3.2' services: homeassistant: container_name: homeassistant - image: ghcr.io/home-assistant/home-assistant:stable + image: ghcr.io/home-assistant/home-assistant:beta labels: - com.centurylinklabs.watchtower.monitor-only=true # HTTPS for CF diff --git a/extras/docker-compose/other/docker-compose.yml b/extras/docker-compose/other/docker-compose.yml index 558fc430..74944b77 100644 --- a/extras/docker-compose/other/docker-compose.yml +++ b/extras/docker-compose/other/docker-compose.yml @@ -378,6 +378,7 @@ services: environment: - MODE=native - TZ=America/Chicago + - AUTO_RECEIVE_SCHEDULE=0 22 * * * ports: - "127.0.0.1:8800:8080" # Expose localhost only for Home Assistant #- "8808:8080" @@ -499,8 +500,8 @@ services: container_name: frigate privileged: true restart: always - #image: ghcr.io/blakeblackshear/frigate:stable - image: ghcr.io/blakeblackshear/frigate:0.13.0-beta7 + image: ghcr.io/blakeblackshear/frigate:stable + #image: ghcr.io/blakeblackshear/frigate:0.13.0-beta7 shm_size: "128mb" devices: - /dev/bus/usb:/dev/bus/usb diff --git a/extras/docker-compose/unified/docker-compose.yml b/extras/docker-compose/unified/docker-compose.yml index 3ab8824a..46b5441f 100644 --- a/extras/docker-compose/unified/docker-compose.yml +++ b/extras/docker-compose/unified/docker-compose.yml @@ -3,7 +3,7 @@ version: '3.2' services: homeassistant: container_name: homeassistant - image: ghcr.io/home-assistant/home-assistant:stable + image: ghcr.io/home-assistant/home-assistant:beta labels: - com.centurylinklabs.watchtower.monitor-only=true # HTTPS for CF @@ -584,6 +584,7 @@ services: environment: - MODE=native - TZ=America/Chicago + - AUTO_RECEIVE_SCHEDULE=0 22 * * * ports: - "127.0.0.1:8800:8080" # Expose localhost only for Home Assistant #- "8808:8080" @@ -705,8 +706,8 @@ services: container_name: frigate privileged: true restart: always - #image: ghcr.io/blakeblackshear/frigate:stable - image: ghcr.io/blakeblackshear/frigate:0.13.0-beta7 + image: ghcr.io/blakeblackshear/frigate:stable + #image: ghcr.io/blakeblackshear/frigate:0.13.0-beta7 shm_size: "128mb" devices: - /dev/bus/usb:/dev/bus/usb diff --git a/extras/traefik/traefik.yaml b/extras/traefik/traefik.yaml index 100dcd14..9589bf46 100644 --- a/extras/traefik/traefik.yaml +++ b/extras/traefik/traefik.yaml @@ -22,4 +22,4 @@ providers: exposedByDefault: false file: directory: "/etc/traefik" - watch: true + watch: true \ No newline at end of file diff --git a/packages/frigate.yaml b/packages/frigate.yaml index 585320c7..5d839348 100644 --- a/packages/frigate.yaml +++ b/packages/frigate.yaml @@ -66,7 +66,7 @@ automation: - alias: Front Door on Photo Frame id: "front_door_on_photo_frame" - mode: restart + mode: 'single' trigger: - platform: mqtt topic: frigate/events @@ -79,11 +79,10 @@ automation: action: - service: script.photo_frame_launch_front_door_stream data: - delay: "00:00:10" # This has to finish before we proceed here - entity_id: media_player.kitchen_photo_frame - - service: script.photo_frame_launch_fotoo - data: - entity_id: media_player.kitchen_photo_frame + delay: "00:00:30" # How long to show video + entity_id: + - media_player.kitchen_photo_frame + - media_player.office_photo_frame - alias: Frigate Notification Deliveries id: "frigate_notification_deliveries" diff --git a/packages/photo_frames.yaml b/packages/photo_frames.yaml index 5362111e..60ae455d 100644 --- a/packages/photo_frames.yaml +++ b/packages/photo_frames.yaml @@ -5,15 +5,14 @@ automation: id: start_fotoo mode: "parallel" trigger: - - platform: state - entity_id: media_player.office_photo_frame - from: "unavailable" - - platform: state - entity_id: media_player.kitchen_photo_frame - from: "unavailable" - platform: state entity_id: - from: "unavailable" + - media_player.office_photo_frame + - media_player.kitchen_photo_frame + - media_player.misc_photo_frame + from: + - "unavailable" + - "unknown" action: - service: script.photo_frame_launch_fotoo data: @@ -71,19 +70,54 @@ script: entity_id: "{{ entity_id }}" photo_frame_launch_front_door_stream: - mode: 'restart' + mode: 'single' sequence: - - variables: - token: "{{ state_attr('camera.front_door_test','access_token')}}" - service: androidtv.adb_command target: entity_id: "{{ entity_id }}" data: - command: "am start -a android.intent.action.VIEW -d 'http://10.0.1.22:8123/api/camera_proxy_stream/camera.front_door_test?token={{ token }}'" - - delay: "{{ delay | default('00:30:00')}}" # If we launch it manually, time out after 30 minutes by default. Override by passing delay to this service - - service: script.photo_frame_launch_fotoo + # https://xdaforums.com/t/how-to-load-full-desktop-websites-permanently-in-chrome-for-android.3771982/post-78875887 + command: "am start -a com.google.android.apps.chrome.ACTION_CLOSE_TABS -n com.android.chrome/org.chromium.chrome.browser.ChromeTabbedActivity" + - service: androidtv.adb_command + target: + entity_id: "{{ entity_id }}" data: + #command: "am start -a android.intent.action.VIEW -d 'http://10.0.1.22:8123/api/camera_proxy_stream/camera.front_door_test?token={{ state_attr('camera.front_door_test','access_token')}}'" + command: "am start -n com.android.chrome/com.google.android.apps.chrome.Main -a android.intent.action.VIEW -d 'http://frigatelocal/live/webrtc/webrtc.html?src=front_door_twoway'" + - delay: "00:00:05" + - service: androidtv.adb_command + target: entity_id: "{{ entity_id }}" + data: + command: "input tap 200 200" # Random Tap + - service: androidtv.adb_command + target: + entity_id: "{{ entity_id }}" + data: + command: "input tap 1850 1033" # Full Screen + # - service: androidtv.adb_command + # target: + # entity_id: "{{ entity_id }}" + # data: + # command: "input tap 1760 1033" # Unmute + # - service: androidtv.adb_command + # target: + # entity_id: "{{ entity_id }}" + # data: + # command: "input tap 1760 1033" # Unmute + - delay: "{{ delay | default('00:00:30')}}" # If we launch it manually, time out after 30 minutes by default. Override by passing delay to this service + # In case we were showing timers before.. + - if: "{{ is_state('input_boolean.kitchen_timers_showing','on') }}" + then: + - service: script.photo_frame_launch_timers + data: + entity_id: + - media_player.kitchen_photo_frame + - media_player.office_photo_frame + else: + - service: script.photo_frame_launch_fotoo + data: + entity_id: "{{ entity_id }}" photo_frame_launch_url: mode: 'restart' @@ -105,4 +139,16 @@ script: target: entity_id: "{{ entity_id }}" data: - command: "adb shell am start -n com.android.chrome/com.google.android.apps.chrome.Main -a android.intent.action.VIEW -d 'http://10.0.1.22:8123/lovelace/timers?wp_enabled=true'" \ No newline at end of file + # https://xdaforums.com/t/how-to-load-full-desktop-websites-permanently-in-chrome-for-android.3771982/post-78875887 + command: "am start -a com.google.android.apps.chrome.ACTION_CLOSE_TABS -n com.android.chrome/org.chromium.chrome.browser.ChromeTabbedActivity" + - service: androidtv.adb_command + target: + entity_id: "{{ entity_id }}" + data: + command: "am start -n com.android.chrome/com.google.android.apps.chrome.Main -a android.intent.action.VIEW -d 'http://10.0.1.22:8123/lovelace/timers?wp_enabled=true'" + - delay: "00:00:15" + - service: androidtv.adb_command + target: + entity_id: "{{ entity_id }}" + data: + command: "input tap 50 200" # tap on screen to make fullscreen \ No newline at end of file diff --git a/packages/timers.yaml b/packages/timers.yaml index b76faaa7..30ef7068 100644 --- a/packages/timers.yaml +++ b/packages/timers.yaml @@ -67,8 +67,7 @@ automation: - media_player.office_photo_frame data: # https://xdaforums.com/t/how-to-load-full-desktop-websites-permanently-in-chrome-for-android.3771982/post-78875887 - command: "adb shell am start -a com.google.android.apps.chrome.ACTION_CLOSE_TABS -n com.android.chrome/org.chromium.chrome.browser.ChromeTabbedActivity" - - delay: "00:00:02" + command: "am start -a com.google.android.apps.chrome.ACTION_CLOSE_TABS -n com.android.chrome/org.chromium.chrome.browser.ChromeTabbedActivity" - service: script.photo_frame_launch_fotoo data: entity_id: