From 3effd47453d6e4b9719a4c1c3f5c1025632ecac8 Mon Sep 17 00:00:00 2001 From: dev Date: Sun, 3 May 2026 13:48:06 +0200 Subject: [PATCH] wip --- .opencode/opencode.json | 6 + .opencode/skills/commit-message.md | 59 ---- AGENTS.md | 27 +- automations.yaml | 62 +++++ automations_waschmaschine.yaml | 20 ++ cron | 5 + ha_areas_config.yaml | 136 ++++++++++ ha_dashboard_complete.yaml | 281 +++++++++++++++++++ lovelace_uebersicht.yaml | 418 +++++++++++++++++++++++++++++ opencode.json | 4 + 10 files changed, 954 insertions(+), 64 deletions(-) create mode 100644 .opencode/opencode.json delete mode 100644 .opencode/skills/commit-message.md create mode 100644 automations.yaml create mode 100644 automations_waschmaschine.yaml create mode 100644 cron create mode 100644 ha_areas_config.yaml create mode 100644 ha_dashboard_complete.yaml create mode 100644 lovelace_uebersicht.yaml create mode 100644 opencode.json diff --git a/.opencode/opencode.json b/.opencode/opencode.json new file mode 100644 index 0000000..c997c03 --- /dev/null +++ b/.opencode/opencode.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://opencode.ai/config.json", + "plugin": [ + "list" + ] +} \ No newline at end of file diff --git a/.opencode/skills/commit-message.md b/.opencode/skills/commit-message.md deleted file mode 100644 index 91ef296..0000000 --- a/.opencode/skills/commit-message.md +++ /dev/null @@ -1,59 +0,0 @@ -# skill: commit-message - -Follow these commit message conventions for all git commits: - -## Format - -``` -(): - -[optional body] - -[optional footer(s)] -``` - -## Types - -| Type | Description | -|------|------------| -| `feat` | New feature | -| `fix` | Bug fix | -| `docs` | Documentation only | -| `style` | Code style (formatting, semicolons) | -| `refactor` | Code change that neither fixes nor adds | -| `test` | Adding or updating tests | -| `chore` | Maintenance, deps, build changes | - -## Rules - -1. Use imperative: "add" not "added" or "adds" -2. Limit subject line to 50 chars -3. Capitalize first letter of description -4. No period at end of subject -5. Use scope (module/file) when applicable - -## Breaking Changes - -If change breaks backward compatibility: -- Add `BREAKING CHANGE:` in footer -- Use `!` after type: `feat!:` - -## Examples - -``` -feat(auth): add login endpoint - -fix(api): resolve null pointer in user response - -docs(readme): update installation steps - -feat!: migrate to v2 API - -BREAKING CHANGE: auth header format changed -``` - -## When to Write Body - -- Explanation of "what" and "why" (not "how") -- More detail than fits in subject line -- References to issues/PRs \ No newline at end of file diff --git a/AGENTS.md b/AGENTS.md index 0372693..94f44aa 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,8 +1,25 @@ # AGENTS.md -This is a new/empty repository. No build, test, or lint commands configured yet. +## Commands -When adding code: -- Add a `README.md` with setup instructions -- Add `package.json` or similar manifest with scripts -- Add `AGENTS.md` guidance once the project has real structure \ No newline at end of file +```bash +# Install dependencies +uv sync + +# Install with test deps +uv sync --extra test + +# Run tests +uv run pytest tests/ -v +``` + +## Project Structure + +- `src/` - Source code +- `tests/` - Unit tests +- `.gitea/workflows/` - CI/CD workflows (Gitea Actions) + +## Skills + +Custom skills stored at `~/.agents/skills/*/SKILL.md`: +- `commit-message` - Conventional Commits format \ No newline at end of file diff --git a/automations.yaml b/automations.yaml new file mode 100644 index 0000000..7ad8810 --- /dev/null +++ b/automations.yaml @@ -0,0 +1,62 @@ +# Home Assistant Automations - Improvements +# Copy these to your automations.yaml file + +- id: waschmaschine_fertig + alias: "Waschmaschine - Fertig-Benachrichtigung" + description: "Sendet Benachrichtigung wenn Waschmaschine fertig (via Leistung = 0W)" + mode: single + triggers: + - trigger: state + entity_id: sensor.waschmaschine_steckdose_leistung + to: "0" + condition: + - condition: state + entity_id: switch.waschmaschine_steckdose + state: "on" + action: + - action: persistent_notification.create + data: + message: "Die Waschmaschine ist fertig! Zeit zum Aufhängen der Wäsche." + title: "Waschmaschine ✅" + - action: tts.google_translate_say + data: + entity_id: media_player.tagesprophet + message: "Die Waschmaschine ist fertig" + language: de + +- id: backup_erfolgreich + alias: "Backup - Erfolgreich-Benachrichtigung" + description: "Benachrichtigung nach erfolgreichem Backup" + mode: single + triggers: + - trigger: state + entity_id: + - event.backup_automatic_backup + to: "completed" + actions: + - action: persistent_notification.create + metadata: {} + data: + message: "✅ Backup erfolgreich abgeschlossen um {{ now() }}" + title: "Home Assistant Backup" + +- id: backup_fehlgeschlagen + alias: "Backup - Fehlgeschlagen-Benachrichtigung" + description: "Benachrichtigung wenn Backup fehlschlägt" + mode: single + triggers: + - trigger: state + entity_id: + - event.backup_automatic_backup + to: "failed" + actions: + - action: persistent_notification.create + metadata: {} + data: + message: "❌ Backup fehlgeschlagen! Grund: {{ state_attr('event.backup_automatic_backup', 'failed_reason') }}" + title: "Home Assistant Backup - FEHLER" + - action: tts.google_translate_say + data: + entity_id: media_player.tagesprophet + message: "Das Backup ist fehlgeschlagen. Bitte überprüfe das System" + language: de \ No newline at end of file diff --git a/automations_waschmaschine.yaml b/automations_waschmaschine.yaml new file mode 100644 index 0000000..5ff9ba4 --- /dev/null +++ b/automations_waschmaschine.yaml @@ -0,0 +1,20 @@ +- id: waschmaschine_fertig + alias: "Waschmaschine - Fertig-Benachrichtigung" + description: "Sendet eine Benachrichtigung wenn die Waschmaschine fertig ist" + triggers: + - trigger: state + entity_id: switch.waschmaschine_steckdose + from: "on" + to: "off" + actions: + - action: notify.persistent_notification + metadata: {} + data: + message: "Die Waschmaschine ist fertig! 🎉" + title: "Waschmaschine" + - action: tts.cloud_say + metadata: {} + data: + entity_id: media_player.tagesprophet + message: "Die Waschmaschine ist fertig" + language: de-DE \ No newline at end of file diff --git a/cron b/cron new file mode 100644 index 0000000..9cd9bb6 --- /dev/null +++ b/cron @@ -0,0 +1,5 @@ +# Daily at 4:00 AM - sync with 3-version retention +0 4 * * * root BACKUP_DATE=$(date +\%Y-\%m-\%d) && rsync -avz -e "ssh -i /root/.ssh/id_vps -p 22" /var/lib/vz/dump/ root@159.195.46.59:/backups/homelab/$BACKUP_DATE/ >> /var/log/pve-backup-sync.log 2>&1 + +# Cleanup: keep last 3 versions (runs after sync) +0 5 * * * root ssh -i /root/.ssh/id_vps -p 22 root@159.195.46.59 "cd /backups/homelab && ls -td 2*/ | tail -n +4 | xargs -r rm -rf" 2>&1 \ No newline at end of file diff --git a/ha_areas_config.yaml b/ha_areas_config.yaml new file mode 100644 index 0000000..00a6f92 --- /dev/null +++ b/ha_areas_config.yaml @@ -0,0 +1,136 @@ +# Areas Configuration Helper +# Add to configuration.yaml or create manually via HA UI + +# Alternative: Create areas manually via Home Assistant UI: +# Settings → Areas & Zones → Add Area + +# Note: Areas must be created via UI as of HA 2025.x +# This file serves as documentation for the recommended structure + +areas: + # Recommended areas for your setup + - name: Wohnzimmer + icon: mdi:sofa + picture: + # Entities to assign later: light.*, cover.*, media_player.*, vacuum.* + + - name: Schlafzimmer + icon: mdi:bed + + - name: Küche + icon: mdi:kitchen + + - name: Badezimmer + icon: mdi:shower + + - name: Technikraum + icon: mdi:server + + - name: Arbeitszimmer + icon: mdi:desk + +# Labels configuration +labels: + - name: Energy + color: "#F1C40F" + + - name: Climate + color: "#3498DB" + + - name: Media + color: "#9B59B6" + + - name: Power + color: "#E74C3C" + + - name: Appliances + color: "#2ECC71" + + - name: Vacuum + color: "#E67E22" + +# Rename helpers - recommended entity customizations +# Add to customize.yaml in your HA config + +assistant: + name: Assistant + entity_id: media_player.assistent + +home: + entity_id: zone.home + +# Entity renames (friendly_name overrides) +# Copy to customize.yaml +sensor: + sensor.waschmaschine_steckdose_leistung: + friendly_name: "Waschmaschine Leistung" + sensor.pc_setup_leistung: + friendly_name: "PC Leistung" + sensor.tv_anlage_leistung: + friendly_name: "TV Leistung" + sensor.all_standby_energy: + friendly_name: "Gesamtverbrauch Standby" + sensor.all_standby_power: + friendly_name: "Aktuelle Leistung" + sensor.electricity_maps_co2_intensitat: + friendly_name: "CO2 Intensität" + sensor.electricity_maps_anteil_fossiler_energietrager: + friendly_name: "Anteil fossile Energie" + +light: + light.wohnzimmerlichter: + friendly_name: "Wohnzimmer Decke" + light.led_streifen: + friendly_name: "TV Hintergrund" + light.innr_fl_120_c_licht: + friendly_name: "Wohnzimmer Tischlampe" + light.leselampe: + friendly_name: "Leselampe" + light.whisky_lampe: + friendly_name: "Nachttischlampe" + light.spiegellicht: + friendly_name: "Spiegellicht" + +cover: + cover.rollos: + friendly_name: "Wohnzimmer Rollos" + cover.lumi_lumi_curtain_acn002_abdeckung: + friendly_name: "Fenster Rollos" + +switch: + switch.waschmaschine_steckdose: + friendly_name: "Waschmaschine" + switch.dobby_einschalter: + friendly_name: "Geschirrspüler" + switch.tv_anlage_steckdose: + friendly_name: "TV Strom" + switch.pc_setup_steckdose: + friendly_name: "PC Strom" + switch.server: + friendly_name: "Server" + switch.3d_drucker_steckdose: + friendly_name: "3D-Drucker" + +vacuum: + vacuum.niles: + friendly_name: "Saugroboter Niles" + +media_player: + media_player.tagesprophet: + friendly_name: "Wohnzimmer Sonos" + media_player.assistent: + friendly_name: "Multiroom Speaker" + media_player.tagesprophet_2: + friendly_name: "Wohnzimmer Sonos 2" + +sensor: + sensor.brother_mfc_l2750dw_series: + friendly_name: "Drucker" + sensor.dobby_betriebszustand: + friendly_name: "Geschirrspüler Status" + +todo: + todo.einkaufsliste_2: + friendly_name: "Einkaufsliste" + todo.kallstadt: + friendly_name: "Kallstadt Liste" \ No newline at end of file diff --git a/ha_dashboard_complete.yaml b/ha_dashboard_complete.yaml new file mode 100644 index 0000000..1c8c0d8 --- /dev/null +++ b/ha_dashboard_complete.yaml @@ -0,0 +1,281 @@ +# Home Assistant Dashboard - Complete Implementation Guide + +## Phase 1: Required Add-ons Installation + +### 1.1 Install HACS (if not installed) + +**Method A - Via Home Assistant UI:** +1. Go to **Settings** → **Add-ons** +2. Click **ADD-ON STORE** (bottom right) +3. Search for **"HACS"** or use: https://my.home-assistant.io/redirect/hacs +4. Install and start HACS +5. Complete GitHub authorization + +**Method B - Via SSH (alternative):** +```bash +wget -q -O /config/custom_components.zip https://github.com/hacs/integration/releases/latest/download/hacs.zip +unzip -o /config/custom_components.zip -d /config/ +rm /config/custom_components.zip +# Restart Home Assistant +``` + +--- + +### 1.2 Install Recommended Add-ons via HACS + +Open HACS → Frontend →搜索并安装: + +| Add-on | Version | Purpose | +|-------|---------|---------| +| **Mushroom** | Latest | Beautiful card templates | +| **button-card** | Latest | Customizable buttons | +| **card-mod** | Latest | CSS styling | +| **layout-card** | Latest | Advanced grids | +| **mini-graph-card** | Latest | Sparkline graphs | + +After installation: +1. **Settings** → **System** → **Restart Home Assistant** +2. Clear browser cache (Ctrl+Shift+R) + +--- + +## Phase 2: Area Configuration + +### 2.1 Create Areas (via UI) + +Go to **Settings** → **Areas & Zones** → **Add Area**: + +| Area Name | Icon | Entities to Add | +|----------|------|-----------------| +| **Wohnzimmer** | sofa | lights, covers, media_player | +| **Schlafzimmer** | bed | lights, climate | +| **Küche** | kitchen | dishwasher, todo | +| **Badezimmer** | shower | lights, washer | +| **Technikraum** | server | server, sensors | +| **Arbeitszimmer** | desk | pc, printer | + +--- + +## Phase 3: Device Naming Guide + +### Recommended Renames (Entity ID → Friendly Name) + +| Current | Rename To | Area | +|---------|----------|------| +| `light.wohnzimmerlichter` | Wohnzimmer Decke | Wohnzimmer | +| `light.led_streifen` | TV Hintergrund | Wohnzimmer | +| `light.innr_fl_120_c_licht` | Wohnzimmer Tischlampe | Wohnzimmer | +| `cover.rollos` | Wohnzimmer Rollos | Wohnzimmer | +| `cover.lumi_lumi_curtain_acn002` | Fenster Rollos | Wohnzimmer | +| `media_player.tagesprophet` | Wohnzimmer Sonos | Wohnzimmer | +| `switch.tv_anlage_steckdose` | TV Strom | Wohnzimmer | +| `light.leselampe` | Leselampe | Schlafzimmer | +| `light.whisky_lampe` | Nachttischlampe | Schlafzimmer | +| `switch.dobby_einschalter` | Geschirrspüler | Küche | +| `switch.dobby_extra_trocken` | Spüler Extra Trocken | Küche | +| `switch.dobby_halbe_beladung` | Spüler Halbe Ladung | Küche | +| `switch.dobby_hygiene` | Spüler Hygiene+ | Küche | +| `light.spiegellicht` | Spiegellicht | Badezimmer | +| `switch.waschmaschine_steckdose` | Waschmaschine | Badezimmer | +| `sensor.waschmaschine_steckdose_leistung` | Waschmaschine Leistung | Badezimmer | +| `switch.server` | Server | Technikraum | +| `switch.3d_drucker_steckdose` | 3D-Drucker | Technikraum | +| `switch.pc_setup_steckdose` | PC Strom | Arbeitszimmer | +| `sensor.pc_setup_leistung` | PC Leistung | Arbeitszimmer | +| `sensor.brother_mfc_l2750dw_series` | Drucker | Arbeitszimmer | +| `sensor.niles_*` | Niles (various) | Wohnzimmer | +| `vacuum.niles` | Saugroboter | Wohnzimmer | + +--- + +## Phase 4: Label Configuration + +Create labels in **Settings** → **Labels**: + +| Label | Color | Entities | +|-------|-------|----------| +| **Energy** | Yellow | power sensors | +| **Climate** | Blue | temp/humidity | +| **Media** | Purple | media players | +| **Power** | Red | switches | +| **Appliances** | Green | washer/dishwasher | +| **Vacuum** | Orange | vacuum | + +--- + +## Phase 5: Dashboard YAML + +### Complete Dashboard Configuration + +Copy the following to your `dashboards/uebersicht.yaml` or create via UI: + +```yaml +title: Übersicht +theme: minimal-light +icon: mdi:home-variant +views: + # === MAIN VIEW === + - title: Übersicht + icon: mdi:home-variant + cards: + # Header Row - Weather, Time, Quick Actions + - type: custom:mushroom-chips-card + chips: + - type: weather + entity: weather.forecast_home + - type: template + icon: mdi:clock-outline + value: "{{ now().strftime('%H:%M') }}" + - type: template + icon: mdi:thermometer + value: "{{ states('sensor.thermometer_temperatur') }}°C" + - type: template + icon: mdi:account-group + value: "{{ states('zone.home') | int }} zu Hause" + entity: zone.home + + # Row 1: Main Room Cards + - type: grid + columns: 2 + cards: + # Wohnzimmer Card + - type: custom:mushroom-entity-card + entity: light.wohnzimmerlichter + name: Wohnzimmer + icon: mdi:sofa + tap_action: + action: navigate + navigation_path: /wiewohnzimmer + features: + - type: light-brightness + + # Küche Card + - type: custom:mushroom-entity-card + entity: todo.einkaufsliste_2 + name: Küche + icon: mdi:kitchen + tap_action: + action: navigate + navigation_path: /view/kueche + + # Row 2: Climate & Appliances + - type: grid + columns: 2 + cards: + # Climate Card + - type: custom:mushroom-climate-card + entity: sensor.thermometer_temperatur + name: Innenraum + icon: mdi:thermometer + show_temperature_control: false + + # Waschmaschine + - type: custom:mushroom-entity-card + entity: switch.waschmaschine_steckdose + name: Waschmaschine + icon: mdi:washing-machine + tap_action: + action: toggle + attributes: + power: sensor.waschmaschine_steckdose_leistung + + # Geschirrspüler + - type: custom:mushroom-entity-card + entity: switch.dobby_einschalter + name: Geschirrspüler + icon: mdi:dishwasher + tap_action: + action: toggle + attributes: + state: sensor.dobby_betriebszustand + + # Saugroboter + - type: custom:mushroom-vacuum-card + entity: vacuum.niles + name: Niles + icon: mdi:robot-vacuum + + # Row 3: Energy Monitoring + - type: custom:mini-graph-card + entities: + - sensor.pc_setup_leistung + - sensor.tv_anlage_leistung + - sensor.waschmaschine_steckdose_leistung + name: Aktueller Verbrauch + hours_to_show: 24 + update_interval: 30 + + # Row 4: System Status + - type: grid + columns: 3 + cards: + # Backup Status + - type: custom:mushroom-entity-card + entity: event.backup_automatiches_backup + name: Backup + icon: mdi:backup-restore + + # Printer + - type: custom:mushroom-entity-card + entity: sensor.brother_mfc_l2750dw_series + name: Drucker + icon: mdi:printer + + # Server + - type: custom:mushroom-entity-card + entity: switch.server + name: Server + icon: mdi:server + + # === ENERGY VIEW === + - title: Energie + icon: mdi:flash + cards: + - type: grid + columns: 2 + cards: + - type: gauge + name: Aktueller Verbrauch + entity: sensor.all_standby_power + min: 0 + max: 500 + unit: W + + - type: statistic + name: Heute (kWh) + entity: sensor.pc_setup_energie_kwh + stat_type: change + period: day + + - type: history-graph + entities: + - sensor.pc_setup_leistung + - sensor.tv_anlage_leistung + - sensor.waschmaschine_steckdose_leistung + name: Verbrauch Over Time + + # === SYSTEM VIEW === + - title: System + icon: mdi:cog + cards: + - type: grid + columns: 2 + cards: + - type: entity + entity: sensor.backup_nachstes_geplantes_automatiches_backup + name: Nächster Backup + + - type: entity + entity: sensor.backup_letztes_erfolgreiches_automatiches_backup + name: Letzter Backup + + - type: entity + entity: update.home_assistant_core_update + name: HA Update + + - type: entities + name: WLAN Status + entities: + - binary_sensor.archer_ax55_wan_status + - sensor.archer_ax55_download_geschwindigkeit + - sensor.archer_ax55_upload_geschwindigkeit \ No newline at end of file diff --git a/lovelace_uebersicht.yaml b/lovelace_uebersicht.yaml new file mode 100644 index 0000000..a6d2cc5 --- /dev/null +++ b/lovelace_uebersicht.yaml @@ -0,0 +1,418 @@ +# ============================================================================= +# Home Assistant Dashboard - OVERSICHT +# A modern, minimal-light dashboard with full energy monitoring +# ============================================================================= +# Installation: Copy content to your dashboards YAML or configure via UI +# ============================================================================= + +title: Übersicht +theme: frontend +icon: mdi:home-variant + +# Cache config for performance +stack: + horizontal: false + +# Views (tabs) +views: + # ----------------------------------------------------------------------------- + # VIEW 1: UBERSICHT (Main Dashboard) + # ----------------------------------------------------------------------------- + - title: Übersicht + icon: mdi:home-variant + path: overview + badges: + - entity: zone.home + name: Zu Hause + - entity: weather.forecast_home + name: Wetter + - entity: sensor.thermometer_temperatur + name: Temperatur + - entity: sensor.electricity_maps_anteil_fossiler_energietrager + name: CO2 + + cards: + # ------------------------------------------------------------------------- + # ROW 0: Header (Weather + Time + Quick Stats) - Custom: Mushroom Chips + # ------------------------------------------------------------------------- + - type: custom:mushroom-chips-card + chips: + - type: weather + entity: weather.forecast_home + show-label: true + - type: template + icon: mdi:thermometer + value: "{{ states('sensor.thermometer_temperatur') }}°" + - type: template + icon: mdi:water-percent + value: "{{ states('sensor.thermometer_luftfeuchtigkeit') }}%" + - type: template + icon: mdi:account-group-outline + value: "{{ states('zone.home') | int }} Pers." + - type: template + icon: mdi:flash + value: "{{ states('sensor.all_standby_power') | round(0) }}W" + + # ------------------------------------------------------------------------- + # ROW 1: Living Room + Kitchen (2 columns) + # ------------------------------------------------------------------------- + - type: grid + columns: 2 + square: true + cards: + # --- Wohnzimmer Tile --- + - type: tile + entity: light.wohnzimmerlichter + name: Wohnzimmer + icon: mdi:ceiling-light + show_state: true + tap_action: + action: call-service + service: light.turn_on + service_data: + entity_id: light.wohnzimmerlichter + longPress_action: + action: navigate + navigation_path: /lovelace/wohnzimmer + features: + - type: light-brightness + - type: light-color-temp + + # --- Küche / Einkaufsliste Tile --- + - type: tile + entity: todo.einkaufsliste_2 + name: Einkaufsliste + icon: mdi:cart + show_state: true + tap_action: + action: navigate + navigation_path: /lovelace/kueche + + # ------------------------------------------------------------------------- + # ROW 2: Climate + Media (2 columns) + # ------------------------------------------------------------------------- + - type: grid + columns: 2 + square: true + cards: + # --- Temperature Card --- + - type: tile + entity: sensor.thermometer_temperatur + name: Innenraum + icon: mdi:thermometer + show_state: true + state_content: "{{ states('sensor.thermometer_temperatur') }}°C / {{ states('sensor.thermometer_luftfeuchtigkeit') }}%" + + # --- Vacuum Status --- + - type: tile + entity: vacuum.niles + name: Niles + icon: mdi:robot-vacuum + show_state: true + + # ------------------------------------------------------------------------- + # ROW 3: Lights Quick Control (Grid - 4 columns) + # ------------------------------------------------------------------------- + - type: grid + columns: 4 + square: false + cards: + - type: button + entity: light.wohnzimmerlichter + name: Decke + icon: mdi:ceiling-light + tap_action: + action: toggle + - type: button + entity: light.led_streifen + name: TV Licht + icon: mdi:television + tap_action: + action: toggle + - type: button + entity: cover.rollos + name: Rollos + icon: mdi:blinds + tap_action: + action: toggle + - type: button + entity: scene.fernsehabend + name: Film + icon: mdi:movie + tap_action: + action: activate + + # ------------------------------------------------------------------------- + # ROW 4: Appliances (2 columns) + # ------------------------------------------------------------------------- + - type: grid + columns: 2 + square: true + cards: + # --- Waschmaschine --- + - type: tile + entity: switch.waschmaschine_steckdose + name: Waschmaschine + icon: mdi:washing-machine + show_state: true + tap_action: + action: toggle + attributes: + Leistung: sensor.waschmaschine_steckdose_leistung + + # --- Geschirrspüler --- + - type: tile + entity: switch.dobby_einschalter + name: Geschirrspüler + icon: mdi:dishwasher + show_state: true + tap_action: + action: toggle + + # ------------------------------------------------------------------------- + # ROW 5: Energy - Current Usage (Full width) + # ------------------------------------------------------------------------- + - type: grid + columns: 3 + square: false + cards: + # --- PC Power --- + - type: tile + entity: sensor.pc_setup_leistung + name: PC + icon: mdi:desktop-tower-monitor + show_state: true + state_content: "{{ states('sensor.pc_setup_leistung') | round(1) }}W" + + # --- TV Power --- + - type: tile + entity: sensor.tv_anlage_leistung + name: TV + icon: mdi:television + show_state: true + state_content: "{{ states('sensor.tv_anlage_leistung') | round(1) }}W" + + # --- Waschmaschine Power --- + - type: tile + entity: sensor.waschmaschine_steckdose_leistung + name: Waschmaschine + icon: mdi:washing-machine + show_state: true + state_content: "{{ states('sensor.waschmaschine_steckdose_leistung') | round(1) }}W" + + # ------------------------------------------------------------------------- + # ROW 6: Server & Network (2 columns) + # ------------------------------------------------------------------------- + - type: grid + columns: 2 + square: true + cards: + # --- Server --- + - type: tile + entity: switch.server + name: Server + icon: mdi:server + show_state: true + tap_action: + action: toggle + + # --- Network Status --- + - type: tile + entity: binary_sensor.archer_ax55_wan_status + name: Netzwerk + icon: mdi:router-wireless + show_state: true + state_content: "{{ states('binary_sensor.archer_ax55_wan_status') }} | {{ states('sensor.archer_ax55_download_geschwindigkeit') | round(0) }} Mbps" + + # ----------------------------------------------------------------------------- + # VIEW 2: ENERGIE (Energy Monitoring) + # ----------------------------------------------------------------------------- + - title: Energie + icon: mdi:flash + path: energie + + cards: + # Current Overview - 2x2 grid + - type: grid + columns: 2 + square: true + cards: + # Total Power Now + - type: gauge + name: Aktuelle Leistung + entity: sensor.all_standby_power + min: 0 + max: 1000 + unit: W + detail: 1 + + # Today's Usage + - type: sensor + entity: sensor.pc_setup_energie_kwh + name: PC heute + icon: mdi:desktop-tower-monitor + graph: line + + # TV Usage + - type: sensor + entity: sensor.tv_anlage_energie_kwh + name: TV heute + icon: mdi:television + graph: line + + # Waschmaschine Usage + - type: sensor + entity: sensor.waschmaschine_steckdose_summe_verbraucht + name: Waschmaschine gesamt + icon: mdi:washing-machine + graph: line + + # Historical Graph + - type: history-graph + title: Verbrauch (24h) + entities: + - sensor.pc_setup_leistung + - sensor.tv_anlage_leistung + - sensor.waschmaschine_steckdose_leistung + - sensor.3d_drucker_steckdose_leistung + hours_to_show: 24 + + # Energy Mix + - type: grid + columns: 2 + cards: + - type: sensor + entity: sensor.electricity_maps_anteil_fossiler_energietrager + name: Fossiler Anteil + icon: mdi:factory + unit: "%" + graph: line + + - type: sensor + entity: sensor.electricity_maps_co2_intensitat + name: CO2 Intensität + icon: mdi:molecule-co2 + unit: g/kWh + graph: line + + # ----------------------------------------------------------------------------- + # VIEW 3: GERATE (Devices) + # ----------------------------------------------------------------------------- + - title: Geräte + icon: mdi:devices + path: gerate + + cards: + # All Lights + - type: entities + title: Lichter + show_header_toggle: true + entities: + - light.wohnzimmerlichter + - light.led_streifen + - light.innr_fl_120_c_licht + - light.leselampe + - light.whisky_lampe + - light.spiegellicht + + # All Switches (Power) + - type: entities + title: Steckdosen + show_header_toggle: true + entities: + - switch.server + - switch.waschmaschine_steckdose + - switch.dobby_einschalter + - switch.tv_anlage_steckdose + - switch.pc_setup_steckdose + - switch.3d_drucker_steckdose + - switch.stereoanlage_steckdose + + # Covers + - type: entities + title: Rollos & Jalousien + show_header_toggle: true + entities: + - cover.rollos + - cover.lumi_lumi_curtain_acn002_abdeckung + + # Media Players + - type: entities + title: Media Player + show_header_toggle: true + entities: + - media_player.tagesprophet + - media_player.tagesprophet_2 + - media_player.assistent + + # ----------------------------------------------------------------------------- + # VIEW 4: SYSTEM + # ----------------------------------------------------------------------------- + - title: System + icon: mdi:cog + path: system + + cards: + # Backup Status + - type: entities + title: Backup + entities: + - entity: sensor.backup_backup_manager_zustand + name: Status + - entity: sensor.backup_letztes_erfolgreiches_automatiches_backup + name: Letztes erfolgreiches Backup + - entity: sensor.backup_nachstes_geplantes_automatiches_backup + name: Naechstes geplantes Backup + + # Updates + - type: entities + title: Updates + entities: + - entity: update.home_assistant_core_update + name: Home Assistant + - entity: update.home_assistant_operating_system_update + name: OS + - entity: update.hacs_update + name: HACS + + # Printer Status + - type: entities + title: Drucker + entities: + - entity: sensor.brother_mfc_l2750dw_series + name: Status + - entity: sensor.brother_mfc_l2750dw_verbleibender_schwarz_toner + name: Schwarz + + # Vacuum Stats + - type: entities + title: Saugroboter + entities: + - entity: sensor.niles_status + name: Status + - entity: sensor.niles_cleaning_time + name: Letzte Reinigung + - entity: sensor.niles_cleaned_area + name: Gereinigte Flaeche + - entity: sensor.niles_total_cleaning_time + name: Gesamtzeit + - entity: sensor.niles_battery_level + name: Akku + + # ----------------------------------------------------------------------------- + # VIEW 5: TODO (Shopping Lists) + # ----------------------------------------------------------------------------- + - title: Listen + icon: mdi:format-list-checks + path: listen + + cards: + # Einkaufsliste + - type: todo-list + title: Einkaufsliste + entity: todo.einkaufsliste_2 + + # Kallstadt + - type: todo-list + title: Kallstadt + entity: todo.kallstadt \ No newline at end of file diff --git a/opencode.json b/opencode.json new file mode 100644 index 0000000..eaac61b --- /dev/null +++ b/opencode.json @@ -0,0 +1,4 @@ +{ + "$schema": "https://opencode.ai/config.json", + "plugin": ["opencode-vibeguard"] +} \ No newline at end of file