A/V Scenes - Activity-based control for your multimedia devices

AV Scenes - Activity-Based Control for your multimedia devices

An alternative to Logitech Harmony and other macro remotes for Home Assistant

Note: This project is currently in a very early version and has only been tested within my own system. Use at your own risk. Contributions and collaborators are very welcome.


What is AV Scenes?

AV Scenes is a Home Assistant integration that brings activity-based control to your AV equipment. Instead of controlling individual devices, you control activities like “Watch Movie”, “Listen to Music”, or “Gaming” - and the integration handles everything else.

  • :white_check_mark: 100% local - no cloud dependency
  • :white_check_mark: Open source - MIT licensed
  • :white_check_mark: Native HA integration - works with your existing media_player entities
  • :white_check_mark: Modern UI - no YAML required

Key Features

Smart Activity Switching

The integration analyzes which devices are used in a current and new activity:

  • Shared devices stay powered on - no interruption
  • Only settings are updated - input source and volume change
  • Transition time: 2-3 seconds instead of 20-30 seconds
  • Extends device lifetime - less power cycling

Automatic Volume Control

  • Set a volume controller per activity (usually your receiver)
  • Define initial volume levels (0-100%)
  • Automatic volume adjustment when starting activities

Power Sequencing

  • Configurable delays between device power-on
  • Ensures devices are ready before sending commands
  • Prevents timing issues with slow-to-boot equipment

Input Source Management

  • Dropdown selection of available sources (read from device)
  • Automatic input switching when activating scenes
  • No manual typing - sources are loaded from your devices

Multi-Room Support

  • Independent control of multiple rooms
  • Each room can have different activities
  • Rooms can be based on Home Assistant areas or custom names

UI-Based Configuration

  • No YAML required
  • Intuitive config flow for setup
  • CRUD operations - add, edit, rename, delete rooms/activities/devices
  • Auto-save - changes are immediately applied
  • Auto-reload - entities update automatically

Use Case Example

Before (Manual Control):

  1. Turn on receiver → wait
  2. Switch receiver input to BD/DVD → wait
  3. Turn on projector → wait
  4. Switch projector input to HDMI1 → wait
  5. Adjust receiver volume
  6. Turn on Blu-ray player → wait

Total time: ~30 seconds, 6 manual steps

After (AV Scenes):

  1. Activate “Watch Movie” scene

And when switching from “Watch TV” to “Watch Movie”:

  • Receiver stays on, just changes input and volume
  • TV/Projector stays on, just changes input if needed
  • Only devices not needed are turned off

Screenshots

Installation

HACS (Recommended)

  1. Open HACS → Integrations
  2. Click ⋮ (three dots) → Custom repositories
  3. Add repository: https://github.com/mkshb/ha_av_scenes
  4. Category: Integration
  5. Click “Download”
  6. Restart Home Assistant

Manual

  1. Download latest release from GitHub
  2. Copy custom_components/av_scenes to your config folder
  3. Restart Home Assistant

Configuration

After installation:

  1. Settings → Devices & Services
  2. Click Add Integration
  3. Search for “AV Scenes”
  4. Follow the setup wizard:
  • Add rooms (or use existing HA areas)
  • Create activities
  • Add devices to activities
  • Configure input sources and volume

Entities Created

For each activity:

  • Scene: scene.{room}_{activity} - activate the activity
  • Switch: switch.{room}_activity - shows current status, turn off to stop

Example:

# Activate "Watch Movie"
service: scene.turn_on
target:
  entity_id: scene.living_room_watch_movie

# Stop current activity
service: switch.turn_off
target:
  entity_id: switch.living_room_activity

Example Configuration

Living Room Setup:

Activity: “Watch Movie”

  • Receiver (Input: BD/DVD, Volume: 65%)
  • Projector (Input: HDMI1)
  • Blu-ray Player

Activity: “Watch TV”

  • Receiver (Input: SAT, Volume: 50%)
  • TV (Input: HDMI1)
  • Satellite Receiver

Activity: “Gaming”

  • Receiver (Input: GAME, Volume: 75%)
  • TV (Input: HDMI2)
  • PlayStation 5

When switching from “Watch TV” to “Gaming”:

  • :white_check_mark: Receiver stays on → Input: SAT→GAME, Volume: 50%→75%
  • :white_check_mark: TV stays on → Input: HDMI1→HDMI2
  • :x: Satellite Receiver turns off
  • :white_check_mark: PlayStation 5 turns on

Languages

  • :de: German - Full translation
  • :uk: English - Full translation

Technical Details

Supported Entities:

  • Currently: media_player entities only
  • Future: lights, covers, climate, etc.

Requirements:

  • Home Assistant 2025.12.0 or newer
  • Devices must support:
    • turn_on / turn_off services
    • source_list attribute (for input switching)
    • volume_set service (for volume control)

Services Provided:

  • av_scenes.start_activity - Start an activity
  • av_scenes.stop_activity - Stop current activity
  • av_scenes.reload - Reload configuration

Lovelace Integration

Simple button example:

type: button
entity: scene.living_room_watch_movie
icon: mdi:movie-open
name: Watch Movie

Multiple activities with status:

type: horizontal-stack
cards:
  - type: button
    entity: scene.living_room_watch_tv
    icon: mdi:television-box
    name: TV
  - type: button
    entity: scene.living_room_watch_movie
    icon: mdi:movie-open
    name: Movie
  - type: button
    entity: scene.living_room_gaming
    icon: mdi:gamepad-variant
    name: Gaming
  - type: button
    entity: switch.living_room_activity
    icon: mdi:power-off
    name: Off
    tap_action:
      action: toggle

Known Limitations

  • Only media_player entities supported (for now)
  • Input switching requires source_list attribute
  • Volume control requires volume_set service
  • No multi-zone receiver support yet (planned for v0.2.0)

Contributing

Contributions are welcome! The project is on GitHub:

Documentation

  • README: Full documentation with examples
  • CHANGELOG: Version history
  • SMART_SWITCHING.md: Technical deep-dive
  • TRANSLATIONS.md: Translation guide

CHANGELOG

[0.2.1] - 2025-12-15

Added

  • :bar_chart: Sensor Entities for Transparency - Each room gets a configuration sensor
    • State: Shows current activity or “Idle”
    • Attributes: Complete details of all activities and devices
    • Device order with all settings visible
    • Perfect for Lovelace dashboard integration
    • Icons change based on status (active: mdi:play-circle, idle: mdi:information-outline)

Fixed

  • :bug: Config Persistence - Deep copy instead of shallow copy in OptionsFlow
    • Nested data (rooms → activities → devices) now copied correctly
    • Device deletions persist reliably
    • Device order remains after changes
    • No more “ghost devices” in core.config_entries

Removed

  • :wastebasket: Redundant Helper Text - Removed data_description from menus
    • “Choose an action” text below dropdown menus no longer visible
    • Cleaner UI without redundant text

[0.2.0] - 2025-12-15

Added

  • :sparkles: Multi-Entity Support - Integration of lights, switches and covers in addition to media players

  • Lights: Brightness (0-100%), color temperature (Mired), transition time

  • Switches: On/off control with configurable delay

  • Covers: Position (0-100%) and tilt position

  • :1234: Device Order Control - Control over device power-on sequence

  • Numbered display (1., 2., 3., …)

  • “Change device order” function to move up/down

  • Devices execute from top to bottom

  • Important for dependencies (e.g., outlet before TV)

  • :floppy_disk: Persistent Device Order - Order persists after Home Assistant restart

  • Explicit storage of device_order list

  • Synchronization with device_states on every save

  • Backward compatibility with existing configurations

  • :wastebasket: Delete Room - Function to delete rooms with all activities

  • :clipboard: Copy Activity - Duplicate existing activities including all devices and settings

  • :bar_chart: Improved Device Display

  • Friendly names instead of entity IDs

  • Power-on delay visible for each device

  • Clear formatting with all important parameters

  • :stopwatch: Cover Delays - power_on_delay now works for covers too

  • :art: Optimized Menu Order - “Finish/Back” options always at the bottom

Fixed

  • :bug: Cover control now uses correct services (open_cover, set_cover_position, close_cover)

  • :bug: Device order is synchronized before every save

  • :bug: Deleted devices are removed from device_order

Changed

  • :arrows_counterclockwise: Coordinator now uses device_order for sequential execution

  • :arrows_counterclockwise: Devices are turned off in reverse order

  • :arrows_counterclockwise: Menus show options dynamically based on content


TL;DR: Activity-based AV control for Home Assistant. Like Harmony, but local, free, and open source. Smart switching keeps devices on during transitions. No YAML needed.

GitHub: GitHub - mkshb/ha_av_scenes: Custom Home Assistant integration to control multi audio/video devices as dynamic scenes

2 Likes

[0.3.0] - 2025-12-17

Added

  • :rocket: Step-by-Step Configuration - Complete redesign of the activity system
    • Each activity consists of individual, configurable steps
    • Granular control: Turn on device, select input, set volume - all separate steps
    • Example: “1. Turn on AV Receiver → 2. Wait 5 sec → 3. Input to HDMI 1 → 4. Turn on Projector”
  • :stopwatch: Flexible Delays - Individual wait time after each step
    • No more global power_on_delay
    • Each step has its own delay_after (0-60 seconds)
    • Perfect for devices that need warm-up time
  • :dart: 11 Step Types for maximum flexibility
    • power_on - Turn on device
    • power_off - Turn off device
    • set_source - Select input (Media Player)
    • set_volume - Set volume (Media Player)
    • set_sound_mode - Set sound mode (Media Player) :new:
    • set_brightness - Set brightness/color (Light)
    • set_color_temp - Set color temperature (Light)
    • set_position - Set position (Cover)
    • set_tilt - Set tilt (Cover)
    • call_action - Call any Home Assistant action :new:
    • delay - Just wait (no device)
  • :loud_sound: Sound Mode Support - Configure sound mode for AV receivers
    • Selection from available sound modes of the device
    • Ideal for different audio scenarios (Movie, Music, Direct, etc.)
  • :zap: Call Action Support - Call any Home Assistant service
    • Format: domain.service (e.g., light.turn_on, script.activate)
    • Optional service data as JSON
    • Maximum flexibility for complex automations
  • :pencil2: Edit Step Functionality - Edit existing steps
    • All parameters can be adjusted afterwards
    • Device selection is preserved
    • Complete translations (DE/EN)
  • :arrows_counterclockwise: Move Up/Down for Steps - Easy step reordering
    • Similar to devices
    • Steps execute from top to bottom
  • :arrows_counterclockwise: Automatic Migration - Old configurations automatically converted
    • Device-based activities → Step-based activities
    • Runs transparently when opening config
    • No data loss
  • :dart: Intelligent Activity Switching Management - Automatic shutdown of unused devices
    • When switching between activities, devices no longer needed are turned off
    • Example: Switch from “Apple TV” (Projector + AV Receiver + Apple TV) to “Sonos” (AV Receiver + Sonos)
      • :white_check_mark: Projector turns off (no longer needed)
      • :white_check_mark: Apple TV turns off (no longer needed)
      • :white_check_mark: AV Receiver stays on (used in both)
    • Devices turn off in reverse order
  • :bar_chart: Improved Step Display - Clear list of all steps with details
    • “1. Turn on AV Receiver (then wait 5s)”
    • “2. Set AV Receiver source to ‘HDMI 1’”
    • “3. Set AV Receiver sound mode to ‘Movie’”
    • “4. Turn on Projector (then wait 2s)”

Changed

  • :building_construction: Completely New Data Structure - From device_states to steps
    • Old structure: Device with all settings
    • New structure: List of individual steps
    • Much more flexible and extensible
  • :control_knobs: Coordinator Rebuilt - Step-by-step execution instead of device-based
    • Executes steps sequentially
    • Waits after each step according to delay_after
    • Better logging for each step
    • Intelligent device management during activity switching
  • :arrows_counterclockwise: async_stop_activity updated - Now uses step-based system
    • Turns off all devices from the activity
    • Respects device order (reversed)

Fixed

  • :bug: CONF_ENTITY_ID Import - Added missing import in coordinator.py
  • :bug: Edit Step Translations - Added missing translations for edit form

There seems to be an issue.

Thanks for the hint, had a wrong repo structure. Should work now.

[0.3.1] - 2025-12-17

:uk: English

Fixed

  • :wrench: HACS Compliance - Fixed repository structure for HACS
    • Moved custom_components directory to repository root
    • Added hacs.json for better HACS integration
    • Ensures the integration can be properly installed via HACS

It does, thanks. I’ll have a play around over the Christmas holiday.

1 Like