Add NAD M12 - Smart Power Follow
327
NAD M12 - Smart Power Follow.-.md
Normal file
327
NAD M12 - Smart Power Follow.-.md
Normal file
@@ -0,0 +1,327 @@
|
|||||||
|
# NAD M12 - Smart Power Follow
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
This Home Assistant Blueprint provides automatic power control for a NAD M12 amplifier based on the state of one or more media players.
|
||||||
|
|
||||||
|
The blueprint turns the NAD amplifier on when at least one selected media player becomes active.
|
||||||
|
|
||||||
|
The amplifier is only turned off when all selected media players are switched off or have an unavailable/unknown state.
|
||||||
|
|
||||||
|
This makes the NAD M12 follow the activity of connected media players automatically.
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- 🎵 Monitors one or more Home Assistant media players
|
||||||
|
- 🔌 Automatically turns the NAD M12 on when a media player becomes active
|
||||||
|
- ⏱️ Configurable delay before turning the amplifier on
|
||||||
|
- 📴 Automatically turns the NAD M12 off when all media players are inactive
|
||||||
|
- ⏱️ Configurable delay before turning the amplifier off
|
||||||
|
- 🔄 Re-checks media player states before powering off
|
||||||
|
- 💡 Supports multiple media players
|
||||||
|
- ⚙️ Fully configurable through the Home Assistant Blueprint UI
|
||||||
|
|
||||||
|
## How it Works
|
||||||
|
|
||||||
|
The blueprint monitors all selected media players.
|
||||||
|
|
||||||
|
When any monitored media player changes state, the blueprint checks whether at least one of them is active.
|
||||||
|
|
||||||
|
The logic is:
|
||||||
|
|
||||||
|
Media Player State Change
|
||||||
|
│
|
||||||
|
▼
|
||||||
|
Check all players
|
||||||
|
│
|
||||||
|
┌─────┴─────┐
|
||||||
|
│ │
|
||||||
|
Active All OFF
|
||||||
|
│ │
|
||||||
|
▼ ▼
|
||||||
|
Wait ON Wait OFF
|
||||||
|
delay delay
|
||||||
|
│ │
|
||||||
|
▼ ▼
|
||||||
|
NAD ON Re-check players
|
||||||
|
│
|
||||||
|
┌─────┴─────┐
|
||||||
|
│ │
|
||||||
|
Active All OFF
|
||||||
|
│ │
|
||||||
|
▼ ▼
|
||||||
|
No action NAD OFF
|
||||||
|
|
||||||
|
## Active Media Players
|
||||||
|
|
||||||
|
A media player is considered active when its state is anything other than:
|
||||||
|
|
||||||
|
off
|
||||||
|
unknown
|
||||||
|
unavailable
|
||||||
|
|
||||||
|
This means that states such as the following are considered active:
|
||||||
|
|
||||||
|
playing
|
||||||
|
paused
|
||||||
|
idle
|
||||||
|
buffering
|
||||||
|
|
||||||
|
The blueprint therefore does not require a specific `playing` state.
|
||||||
|
|
||||||
|
Instead, it treats every available state other than `off`, `unknown` and `unavailable` as active.
|
||||||
|
|
||||||
|
## Turning the NAD M12 On
|
||||||
|
|
||||||
|
When at least one selected media player is active, the blueprint turns on the NAD M12.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
Media Player 1: playing
|
||||||
|
Media Player 2: off
|
||||||
|
Media Player 3: off
|
||||||
|
|
||||||
|
Result:
|
||||||
|
|
||||||
|
NAD M12 → ON
|
||||||
|
|
||||||
|
If a power-on delay is configured, the blueprint waits before turning on the amplifier.
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
Power On Delay: 5 seconds
|
||||||
|
|
||||||
|
The sequence becomes:
|
||||||
|
|
||||||
|
Media player becomes active
|
||||||
|
│
|
||||||
|
▼
|
||||||
|
Wait 5 seconds
|
||||||
|
│
|
||||||
|
▼
|
||||||
|
NAD M12 ON
|
||||||
|
|
||||||
|
## Turning the NAD M12 Off
|
||||||
|
|
||||||
|
The NAD M12 is only turned off when all selected media players are inactive.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
Media Player 1: off
|
||||||
|
Media Player 2: off
|
||||||
|
Media Player 3: off
|
||||||
|
|
||||||
|
Result:
|
||||||
|
|
||||||
|
NAD M12 → OFF
|
||||||
|
|
||||||
|
If a power-off delay is configured, the blueprint waits before switching off the amplifier.
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
Power Off Delay: 30 seconds
|
||||||
|
|
||||||
|
The sequence becomes:
|
||||||
|
|
||||||
|
All media players OFF
|
||||||
|
│
|
||||||
|
▼
|
||||||
|
Wait 30 seconds
|
||||||
|
│
|
||||||
|
▼
|
||||||
|
Re-check players
|
||||||
|
│
|
||||||
|
▼
|
||||||
|
Still all OFF?
|
||||||
|
│ │
|
||||||
|
YES NO
|
||||||
|
│ │
|
||||||
|
▼ ▼
|
||||||
|
NAD OFF No action
|
||||||
|
|
||||||
|
The second check is important because another media player may become active during the delay.
|
||||||
|
|
||||||
|
## Multiple Media Players
|
||||||
|
|
||||||
|
The blueprint supports multiple media players.
|
||||||
|
|
||||||
|
For example:
|
||||||
|
|
||||||
|
Apple TV
|
||||||
|
Chromecast
|
||||||
|
Spotify
|
||||||
|
Home Assistant Media Player
|
||||||
|
|
||||||
|
If any one of these is active, the NAD M12 remains powered on.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
Apple TV: playing
|
||||||
|
Chromecast: off
|
||||||
|
Spotify: off
|
||||||
|
|
||||||
|
→ NAD M12 ON
|
||||||
|
|
||||||
|
If the Apple TV is then switched off but Spotify is still active:
|
||||||
|
|
||||||
|
Apple TV: off
|
||||||
|
Chromecast: off
|
||||||
|
Spotify: playing
|
||||||
|
|
||||||
|
→ NAD M12 remains ON
|
||||||
|
|
||||||
|
Only when all selected media players are inactive will the NAD M12 be switched off.
|
||||||
|
|
||||||
|
## Blueprint Inputs
|
||||||
|
|
||||||
|
| Input | Description | Default |
|
||||||
|
|---|---|---|
|
||||||
|
| Media Players | Media players that can control the NAD M12 | — |
|
||||||
|
| NAD M12 | Media player entity representing the amplifier | — |
|
||||||
|
| Power On Delay | Delay before turning the amplifier on | 0 s |
|
||||||
|
| Power Off Delay | Delay before turning the amplifier off | 30 s |
|
||||||
|
|
||||||
|
## Recommended Settings
|
||||||
|
|
||||||
|
A typical configuration could be:
|
||||||
|
|
||||||
|
Power On Delay: 0 seconds
|
||||||
|
Power Off Delay: 30 seconds
|
||||||
|
|
||||||
|
This provides immediate amplifier activation while preventing the NAD from switching off immediately when a media player briefly changes state.
|
||||||
|
|
||||||
|
For systems where media players need time to stabilize:
|
||||||
|
|
||||||
|
Power On Delay: 5 seconds
|
||||||
|
Power Off Delay: 60 seconds
|
||||||
|
|
||||||
|
## Example: Typical Operation
|
||||||
|
|
||||||
|
### Starting playback
|
||||||
|
|
||||||
|
Media Player: playing
|
||||||
|
│
|
||||||
|
▼
|
||||||
|
NAD M12 ON
|
||||||
|
|
||||||
|
### Switching between sources
|
||||||
|
|
||||||
|
Apple TV: playing
|
||||||
|
Spotify: off
|
||||||
|
|
||||||
|
│
|
||||||
|
▼
|
||||||
|
|
||||||
|
Apple TV: off
|
||||||
|
Spotify: playing
|
||||||
|
|
||||||
|
│
|
||||||
|
▼
|
||||||
|
|
||||||
|
NAD M12 remains ON
|
||||||
|
|
||||||
|
### Stopping all playback
|
||||||
|
|
||||||
|
Apple TV: off
|
||||||
|
Spotify: off
|
||||||
|
Chromecast: off
|
||||||
|
|
||||||
|
│
|
||||||
|
▼
|
||||||
|
Wait 30 seconds
|
||||||
|
│
|
||||||
|
▼
|
||||||
|
Re-check players
|
||||||
|
│
|
||||||
|
▼
|
||||||
|
NAD M12 OFF
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
|
||||||
|
- Home Assistant
|
||||||
|
- One or more `media_player` entities
|
||||||
|
- A `media_player` entity representing the NAD M12
|
||||||
|
- The NAD M12 must support `media_player.turn_on` and `media_player.turn_off`
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
1. Download the Blueprint YAML file.
|
||||||
|
2. Open **Home Assistant**.
|
||||||
|
3. Go to:
|
||||||
|
|
||||||
|
Settings → Automations & Scenes → Blueprints
|
||||||
|
|
||||||
|
4. Import the Blueprint.
|
||||||
|
5. Create a new automation from the Blueprint.
|
||||||
|
6. Select all media players that should be able to control the NAD M12.
|
||||||
|
7. Select the NAD M12 media player entity.
|
||||||
|
8. Configure the desired power-on and power-off delays.
|
||||||
|
|
||||||
|
## Troubleshooting
|
||||||
|
|
||||||
|
### NAD M12 does not turn on
|
||||||
|
|
||||||
|
Check that the selected NAD entity is a `media_player`.
|
||||||
|
|
||||||
|
Also verify that Home Assistant can control the amplifier using:
|
||||||
|
|
||||||
|
media_player.turn_on
|
||||||
|
|
||||||
|
### NAD M12 does not turn off
|
||||||
|
|
||||||
|
Check that all selected media players actually transition to:
|
||||||
|
|
||||||
|
off
|
||||||
|
|
||||||
|
The blueprint also treats:
|
||||||
|
|
||||||
|
unknown
|
||||||
|
unavailable
|
||||||
|
|
||||||
|
as inactive states.
|
||||||
|
|
||||||
|
If the NAD does not turn off, check whether one of the selected media players remains in another active state such as:
|
||||||
|
|
||||||
|
idle
|
||||||
|
paused
|
||||||
|
playing
|
||||||
|
|
||||||
|
These states are considered active by the blueprint.
|
||||||
|
|
||||||
|
### NAD turns off too quickly
|
||||||
|
|
||||||
|
Increase the **Power Off Delay**.
|
||||||
|
|
||||||
|
For example:
|
||||||
|
|
||||||
|
Power Off Delay: 60 seconds
|
||||||
|
|
||||||
|
The blueprint will wait 60 seconds and then check all media players again before switching off the amplifier.
|
||||||
|
|
||||||
|
### NAD turns on too quickly
|
||||||
|
|
||||||
|
Increase the **Power On Delay**.
|
||||||
|
|
||||||
|
For example:
|
||||||
|
|
||||||
|
Power On Delay: 5 seconds
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
|
||||||
|
The automation uses `mode: restart`.
|
||||||
|
|
||||||
|
This is important because a new media player state change restarts the automation while a power-on or power-off delay is in progress.
|
||||||
|
|
||||||
|
This allows the latest media player state to determine whether the NAD M12 should ultimately remain on or be switched off.
|
||||||
|
|
||||||
|
## Changelog
|
||||||
|
|
||||||
|
### v1.0
|
||||||
|
|
||||||
|
- Initial release
|
||||||
|
- Support for multiple media players
|
||||||
|
- Automatic NAD M12 power-on
|
||||||
|
- Automatic NAD M12 power-off
|
||||||
|
- Configurable power-on delay
|
||||||
|
- Configurable power-off delay
|
||||||
|
- Re-check of media player states before power-off
|
||||||
Reference in New Issue
Block a user