From d67c33f9609fb0c0bf4765efdca63ff774611146 Mon Sep 17 00:00:00 2001 From: Hofmann Engineer Date: Tue, 2 Dec 2025 03:35:05 +0000 Subject: [PATCH] Add Home Assistant configuration files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - configuration.yaml (main HA config) - ui-lovelace.yaml (dashboard with System Admin view) - automations.yaml - scripts.yaml 🤖 Generated with Claude Code (https://claude.com/claude-code) Co-Authored-By: Claude --- configs/homeassistant/automations.yaml | 39 ++ configs/homeassistant/configuration.yaml | 41 ++ configs/homeassistant/scripts.yaml | 95 +++++ configs/homeassistant/ui-lovelace.yaml | 471 +++++++++++++++++++++++ 4 files changed, 646 insertions(+) create mode 100644 configs/homeassistant/automations.yaml create mode 100644 configs/homeassistant/configuration.yaml create mode 100644 configs/homeassistant/scripts.yaml create mode 100644 configs/homeassistant/ui-lovelace.yaml diff --git a/configs/homeassistant/automations.yaml b/configs/homeassistant/automations.yaml new file mode 100644 index 0000000..e5694f2 --- /dev/null +++ b/configs/homeassistant/automations.yaml @@ -0,0 +1,39 @@ +# Example automations for Govee lights +- id: '1' + alias: Good Morning Lights + description: Turn on lights bright in the morning + trigger: + - platform: time + at: '07:00:00' + condition: [] + action: + - service: scene.turn_on + target: + entity_id: scene.bright + mode: single + +- id: '2' + alias: Good Night Lights + description: Turn off lights at night + trigger: + - platform: time + at: '23:00:00' + condition: [] + action: + - service: scene.turn_on + target: + entity_id: scene.all_off + mode: single + +- id: '3' + alias: Movie Mode at Sunset + description: Dim lights when sun sets + trigger: + - platform: sun + event: sunset + condition: [] + action: + - service: scene.turn_on + target: + entity_id: scene.movie_time + mode: single diff --git a/configs/homeassistant/configuration.yaml b/configs/homeassistant/configuration.yaml new file mode 100644 index 0000000..b0a1a95 --- /dev/null +++ b/configs/homeassistant/configuration.yaml @@ -0,0 +1,41 @@ + +# Loads default set of integrations. Do not remove. +default_config: + +# Load packages for better organization +homeassistant: + packages: !include_dir_named packages + +# HTTP configuration for reverse proxy +http: + use_x_forwarded_for: true + trusted_proxies: + - 192.168.1.50 + - 127.0.0.1 + - ::1 + - 172.21.0.0/16 + server_host: + - homeassistant.local + - ha.local + - home.rp5 + - 192.168.1.50 + +# Load frontend themes from the themes folder +frontend: + themes: !include_dir_merge_named themes + +# Lovelace UI mode +lovelace: + mode: yaml + resources: [] + dashboards: + lovelace-yaml: + mode: yaml + filename: ui-lovelace.yaml + title: My Smart Home + icon: mdi:home + show_in_sidebar: true + +automation: !include automations.yaml +script: !include scripts.yaml +scene: !include scenes.yaml diff --git a/configs/homeassistant/scripts.yaml b/configs/homeassistant/scripts.yaml new file mode 100644 index 0000000..49909ba --- /dev/null +++ b/configs/homeassistant/scripts.yaml @@ -0,0 +1,95 @@ +# Quick light controls +lights_on: + alias: "Turn All Lights On" + sequence: + - service: light.turn_on + target: + entity_id: all + data: + brightness_pct: 100 + +lights_off: + alias: "Turn All Lights Off" + sequence: + - service: light.turn_off + target: + entity_id: all + +lights_dim: + alias: "Dim All Lights" + sequence: + - service: light.turn_on + target: + entity_id: all + data: + brightness_pct: 30 + +cast_pause_all: + alias: "Pause All Cast Devices" + sequence: + - service: media_player.media_pause + target: + entity_id: media_player.google_cast + +# Bluetooth Management Scripts +bluetooth_scan: + alias: "Scan for Bluetooth Devices" + icon: mdi:bluetooth-search + sequence: + - service: shell_command.bluetooth_scan + - service: persistent_notification.create + data: + title: "Bluetooth Scan" + message: "Scanning for Bluetooth devices..." + +bluetooth_connect_speaker: + alias: "Connect to JBL PartyBox" + icon: mdi:speaker-bluetooth + sequence: + - service: shell_command.bluetooth_connect + data: + device: "68:52:10:33:F3:98" + - service: persistent_notification.create + data: + title: "Bluetooth" + message: "Connecting to JBL PartyBox 710..." + +bluetooth_connect_headphones: + alias: "Connect to MOMENTUM 3" + icon: mdi:headphones-bluetooth + sequence: + - service: shell_command.bluetooth_connect + data: + device: "00:1B:66:E9:9E:89" + - service: persistent_notification.create + data: + title: "Bluetooth" + message: "Connecting to MOMENTUM 3 headphones..." + +bluetooth_connect_soundbar: + alias: "Connect to Samsung Soundbar" + icon: mdi:soundbar + sequence: + - service: shell_command.bluetooth_connect + data: + device: "E4:7D:BD:C2:13:F5" + - service: persistent_notification.create + data: + title: "Bluetooth" + message: "Connecting to Samsung Soundbar..." + +bluetooth_disconnect_all: + alias: "Disconnect All Bluetooth" + icon: mdi:bluetooth-off + sequence: + - service: shell_command.bluetooth_disconnect_all + - service: persistent_notification.create + data: + title: "Bluetooth" + message: "Disconnecting all Bluetooth devices..." + +bluetooth_list_devices: + alias: "List Bluetooth Devices" + icon: mdi:format-list-bulleted + sequence: + - service: shell_command.bluetooth_list diff --git a/configs/homeassistant/ui-lovelace.yaml b/configs/homeassistant/ui-lovelace.yaml new file mode 100644 index 0000000..f4d9332 --- /dev/null +++ b/configs/homeassistant/ui-lovelace.yaml @@ -0,0 +1,471 @@ +title: My Smart Home +views: + - title: Home + path: home + icon: mdi:home + cards: [] + + - title: Media Hub + path: media + icon: mdi:youtube-tv + theme: cyberpunk_media + badges: [] + cards: + # CYBERPUNK MEDIA INTERFACE + - type: iframe + url: /local/media-search-fancy.html + aspect_ratio: 120% + title: "⚡ MEDIA HUB ⚡" + + # TV CASTING CONTROLS + - type: vertical-stack + cards: + - type: markdown + content: | + # 📺 CAST TO TV +
Send this dashboard to your TV!
+ + - type: entities + title: "🎯 TV Controls" + show_header_toggle: false + entities: + - entity: input_select.active_tv + name: "Select TV" + icon: mdi:television + - entity: sensor.available_tvs + name: "Available Devices" + icon: mdi:cast-connected + - entity: sensor.primary_tv_status + name: "Status" + icon: mdi:information + + - type: horizontal-stack + cards: + - type: button + name: "Cast Dashboard" + icon: mdi:cast + tap_action: + action: url + url_path: "http://192.168.1.50:8123/local/media-hub-tv.html" + hold_action: + action: none + show_name: true + show_icon: true + + - type: button + name: "TV Mode" + icon: mdi:television + tap_action: + action: navigate + navigation_path: "/local/media-hub-tv.html" + hold_action: + action: none + show_name: true + show_icon: true + + - type: markdown + content: | + **Quick Instructions:** + 1. Open on your TV browser: `http://192.168.1.50:8123/local/media-hub-tv.html` + 2. Or click "TV Mode" button above + 3. Use TV remote: ↑ ↓ ← → and OK + + **Supported:** + - ✅ Google Chromecast + - ✅ Apple TV (Browser) + - ✅ Panasonic Smart TV + - ✅ Any Smart TV with Browser + + # STATS DASHBOARD + - type: vertical-stack + cards: + - type: markdown + content: | + # 📊 YOUR MEDIA STATS +
Track your streaming habits in real-time!
+ + - type: horizontal-stack + cards: + - type: entity + entity: sensor.favorite_streaming_service + name: "🏆 Favorite" + icon: mdi:star + - type: entity + entity: sensor.total_streams_today + name: "📺 Today" + icon: mdi:chart-line + - type: entity + entity: sensor.media_hub_status + name: "⚡ Status" + icon: mdi:power + + # LAUNCH COUNTERS + - type: glance + title: "🚀 LAUNCH STATS" + show_state: true + columns: 4 + entities: + - entity: counter.youtube_launches + name: YouTube + icon: mdi:youtube + - entity: counter.netflix_launches + name: Netflix + icon: mdi:netflix + - entity: counter.prime_launches + name: Prime + icon: mdi:amazon + - entity: counter.apple_tv_launches + name: Apple TV + icon: mdi:apple + + # QUICK LAUNCH BUTTONS (Enhanced) + - type: horizontal-stack + cards: + - type: button + name: YouTube + icon: mdi:youtube + icon_height: 60px + tap_action: + action: call-service + service: script.launch_youtube + hold_action: + action: url + url_path: https://www.youtube.com/@hofmann.engineer4736 + show_name: true + show_icon: true + card_mod: + style: | + ha-card { + background: linear-gradient(135deg, #FF0000, #CC0000); + color: white; + font-weight: bold; + border: 2px solid #FF0000; + box-shadow: 0 0 20px rgba(255, 0, 0, 0.5); + } + + - type: button + name: Netflix + icon: mdi:netflix + icon_height: 60px + tap_action: + action: call-service + service: script.launch_netflix + hold_action: + action: url + url_path: https://www.netflix.com/browse + show_name: true + show_icon: true + + - type: horizontal-stack + cards: + - type: button + name: Prime Video + icon: mdi:amazon + icon_height: 60px + tap_action: + action: call-service + service: script.launch_prime_video + hold_action: + action: url + url_path: https://www.amazon.com/Prime-Video/b?node=2676882011 + show_name: true + show_icon: true + + - type: button + name: Apple TV+ + icon: mdi:apple + icon_height: 60px + tap_action: + action: call-service + service: script.launch_apple_tv + hold_action: + action: url + url_path: https://tv.apple.com + show_name: true + show_icon: true + + # YouTube Channel Card + - type: markdown + title: Hofmann.Engineer YouTube Channel + content: | + ## Your YouTube Channel + **Channel:** @hofmann.engineer4736 + **Email:** hofmann.engineer@gmail.com + **Subscribers:** 1 + + [Open Channel](https://www.youtube.com/@hofmann.engineer4736) + [YouTube Studio](https://studio.youtube.com) + [Upload Video](https://studio.youtube.com/channel/upload) + + --- + + # Streaming Services Links + - type: entities + title: All Streaming Services + icon: mdi:television-play + show_header_toggle: false + entities: + - type: weblink + name: YouTube + url: https://www.youtube.com/@hofmann.engineer4736 + icon: mdi:youtube + - type: weblink + name: Netflix + url: https://www.netflix.com/browse + icon: mdi:netflix + - type: weblink + name: Prime Video + url: https://www.amazon.com/Prime-Video/b?node=2676882011 + icon: mdi:amazon + - type: weblink + name: Apple TV+ + url: https://tv.apple.com + icon: mdi:apple + - type: weblink + name: YouTube TV + url: https://tv.youtube.com + icon: mdi:youtube-tv + + # Search Aggregator Card + - type: markdown + title: Find Where to Watch + content: | + ## Search Across Platforms + + Use [JustWatch](https://www.justwatch.com) to find where any movie or TV show is streaming. + + **Popular Services:** + - Netflix, Prime Video, Apple TV+, Disney+, HBO Max, Hulu + + Enter your search above and click to find availability! + + # YouTube Iframe (may require additional config) + - type: iframe + url: https://www.youtube.com/embed?listType=user_uploads&list=UUhofmann.engineer4736 + aspect_ratio: 75% + title: Your YouTube Videos + + # Quick Start Guide + - type: markdown + title: Quick Start Guide + content: | + ## Welcome to Your Media Hub! + + ### Features: + ✅ **Unified Search** - Search across all platforms at once + ✅ **Quick Launch** - One-click access to all streaming services + ✅ **YouTube Integration** - Direct access to your channel & studio + ✅ **JustWatch Integration** - Find where any content is streaming + + ### How to Use: + 1. Use the search box at the top to find content across platforms + 2. Click service buttons for quick access + 3. Check JustWatch to see where content is available + 4. Access your YouTube channel and studio directly + + ### Your Services: + - **YouTube**: @hofmann.engineer4736 + - **Netflix**: Browse and watch + - **Prime Video**: Amazon's streaming service + - **Apple TV+**: Apple's original content + - **YouTube TV**: Live TV streaming + + ### Tips: + - Bookmark this dashboard for quick access + - Search works across all major streaming platforms + - YouTube Studio link goes directly to content management + + --- + Created by Claude Code for Hofmann.Engineer + + - title: Bluetooth Manager + path: bluetooth + icon: mdi:bluetooth + badges: [] + cards: + # Bluetooth Status Card + - type: entities + title: Bluetooth Status + icon: mdi:bluetooth-settings + show_header_toggle: false + entities: + - entity: binary_sensor.bluetooth_adapter_active + name: Bluetooth Adapter + - entity: sensor.bluetooth_adapter_status + name: Adapter Status + - entity: sensor.bluetooth_device_count + name: Discovered Devices + - entity: sensor.bluetooth_connected_devices + name: Connected Devices + + # Quick Connect Dropdown + - type: entities + title: Quick Connect + icon: mdi:bluetooth-connect + show_header_toggle: false + entities: + - entity: input_select.bluetooth_quick_connect + name: Select Device to Connect + + # Quick Connect Buttons + - type: horizontal-stack + cards: + - type: button + name: JBL PartyBox + icon: mdi:speaker-bluetooth + tap_action: + action: call-service + service: script.bluetooth_connect_speaker + hold_action: + action: none + + - type: button + name: MOMENTUM 3 + icon: mdi:headphones-bluetooth + tap_action: + action: call-service + service: script.bluetooth_connect_headphones + hold_action: + action: none + + - type: button + name: Soundbar + icon: mdi:soundbar + tap_action: + action: call-service + service: script.bluetooth_connect_soundbar + hold_action: + action: none + + # Bluetooth Actions + - type: entities + title: Bluetooth Actions + icon: mdi:bluetooth-audio + show_header_toggle: false + entities: + - entity: script.bluetooth_scan + name: Scan for Devices + icon: mdi:bluetooth-search + - entity: script.bluetooth_list_devices + name: List All Devices + icon: mdi:format-list-bulleted + - entity: script.bluetooth_disconnect_all + name: Disconnect All + icon: mdi:bluetooth-off + + # Device Information + - type: markdown + content: | + ## Discovered Bluetooth Devices + + **Audio Devices:** + - JBL PartyBox 710 (68:52:10:33:F3:98) + - MOMENTUM 3 Headphones (00:1B:66:E9:9E:89) + - Samsung Soundbar MS6500 (E4:7D:BD:C2:13:F5) + - DC Soundbar (4C:57:39:CA:D8:DE) + + **Smart Home Devices:** + - Multiple Govee Lights + - Govee Temperature Sensors + - Petkit W4X + + **TV/Display:** + - Samsung Q7 Series TV (FC:03:9F:FA:91:8B) + + --- + + **Tips:** + - Use the dropdown above for quick connects + - Scan periodically to find new devices + - Some devices may require pairing first + + # Advanced Controls + - type: entities + title: Advanced Controls + icon: mdi:cog-bluetooth + show_header_toggle: false + state_color: true + entities: + - type: weblink + name: Bluetooth Settings + url: /config/integrations/integration/bluetooth + icon: mdi:bluetooth-settings + - type: weblink + name: Devices & Services + url: /config/devices + icon: mdi:devices + + - title: System Admin + path: admin + icon: mdi:cog + badges: [] + cards: + # Terminal (SSH via ttyd) + - type: iframe + url: http://192.168.1.50:7681 + aspect_ratio: 60% + title: Terminal + + # Router Admin + - type: iframe + url: http://192.168.1.1 + aspect_ratio: 60% + title: Router Admin + + # Quick Links + - type: horizontal-stack + cards: + - type: button + name: Portainer + icon: mdi:docker + tap_action: + action: url + url_path: http://192.168.1.50:9000 + hold_action: + action: url + url_path: https://192.168.1.50:9443 + + - type: button + name: AdGuard + icon: mdi:shield-check + tap_action: + action: url + url_path: http://192.168.1.50:3000 + + - type: button + name: VPN Admin + icon: mdi:vpn + tap_action: + action: url + url_path: https://vpn.hofmanns.tech + + # Portainer iframe + - type: iframe + url: http://192.168.1.50:9000 + aspect_ratio: 60% + title: Portainer + + # AdGuard iframe + - type: iframe + url: http://192.168.1.50:3000 + aspect_ratio: 60% + title: AdGuard Home + + # System Info + - type: markdown + content: | + ## System Information + + **Local Services:** + - **Home Assistant**: http://192.168.1.50:8123 + - **Portainer**: http://192.168.1.50:9000 + - **AdGuard Home**: http://192.168.1.50:3000 + - **Terminal (ttyd)**: http://192.168.1.50:7681 + - **Router**: http://192.168.1.1 + + **Remote Services:** + - **VPN Admin**: https://vpn.hofmanns.tech + + **Tailscale:** + - DNS: pike-crocodile.ts.net + - Local: rp5.hofmanns.net (100.64.0.1)