Compare commits

..

16 Commits

Author SHA1 Message Date
d486f20378 Remove validate_yaml script 2025-12-21 15:52:14 -08:00
7a92040822 Add gitignore 2025-12-21 15:52:06 -08:00
63dec6c5ee Add Inovelli Blue Dimmer switch hardware documentation 2025-12-21 15:51:08 -08:00
40e03d0300 Reorganize blueprints: move legacy blueprints to blueprints/automation 2025-12-21 15:50:59 -08:00
4b285770d2 Fix presence_mode_reset blueprint variable scoping issue
Move condition check into action sequence after variables are defined.
Previously, the condition tried to use 'occupancy_sensors' before it was
defined, causing UndefinedError during automation execution.
2025-12-21 15:35:23 -08:00
a5a6b9d4b6 Add comprehensive documentation and testing tools
- Update README with complete setup guide and all blueprint URLs
- Add PACKAGE_SETUP_GUIDE with step-by-step setup instructions
- Add ROOM_CONFIGURATION_GUIDE with bedroom, living room, and bathroom examples
- Add HARDWARE_TESTING_CHECKLIST for validating with real Inovelli switches
- Add CHANGELOG documenting v1.0.0 release
- Add validation script for automated YAML testing
- Add test configuration example for testing without hardware
2025-12-21 14:30:53 -08:00
5eec41a43c Add button actions and presence reset blueprints
- Add inovelli_button_actions blueprint for multi-tap controls
  - Double-tap up: brightness boost (+50%)
  - Double-tap down: return to adaptive lighting
  - Triple-tap up: max brightness (100%, 4000K)
  - Triple-tap down: night light (5%, warm red)
  - Configurable auto-reset timeout

- Add presence_mode_reset blueprint for occupancy integration
  - Auto-reset manual control when room empty
  - Optional mode reset to default
  - Configurable empty delay
  - Multiple occupancy sensor support

- Fix entity name in living room template (light.living_room_lights)
2025-12-21 14:30:41 -08:00
602a2b7e78 Phase 2 2025-12-20 15:36:06 -08:00
27d322f09f Update feedback flash to 0.5 seconds 2025-12-20 15:33:41 -08:00
4f344e7b16 Fix inovelli_mode_cycling blueprint trigger for event entities
Correct the trigger mechanism to match how Home Assistant event entities
actually work. Event entities trigger on state changes and expose the
actual event type as an attribute, not as event_data.

Changes:
- Replace platform:event trigger with platform:state
- Add condition to check event_type attribute for 'config_single'
- Remove incorrect event_data and state_changed event_type usage

This matches the working pattern used in production automations and
ensures the blueprint triggers correctly when the config button is
pressed on Inovelli switches.
2025-12-20 15:24:24 -08:00
44c7771f09 Update inovelli_mode_cycling blueprint to use event entity
Change from sensor-based to event-based trigger for Inovelli button
presses. This aligns with Zigbee2MQTT's modern event entity approach
and matches the Phase 1 plan specification.

Changes:
- Replace switch_action_sensor (sensor domain) with switch_action_event (event domain)
- Update trigger from platform:state to platform:event with event_data
- Use state_changed event type for proper event handling

This provides more reliable button press detection and cleaner event
handling compared to the older sensor state monitoring approach.
2025-12-20 15:15:03 -08:00
988a7e0933 Fix inovelli_mode_cycling blueprint: remove invalid 'example' key
The 'example' key is not a valid blueprint input parameter in Home Assistant.
Moved the example value into the description field instead.
2025-12-20 15:02:37 -08:00
258c4172e9 Implement Adaptive Lighting Mode System Phase 1 foundation
Add global mode definitions and config button mode cycling blueprint to
establish the foundation for the adaptive lighting mode system.

Changes:
- Add input_text helpers for all 11 mode settings (Adaptive, Reading,
  Relaxing, Sleep, Theater, Party, Homework, Play, Cooking, Dining,
  Cleanup) with JSON configuration for brightness, color temp, and
  transition parameters
- Store mode settings as individual input_text entities to work within
  Home Assistant's 255 character limit
- Add usage notes for accessing mode settings in templates
- Fix variable definition bug in inovelli_mode_cycling blueprint by
  adding zigbee2mqtt_device_name to variables section
- Update README to reflect that PACKAGE_SETUP_GUIDE.md exists

All YAML files validated with yamllint. JSON configuration validated
with jq.

Part of Phase 1 implementation from adaptive lighting mode system plan.
Automated verification complete, ready for manual testing.
2025-12-20 15:00:02 -08:00
ea20e11bdd Remove invalid helper script from global package
- Remove script.get_mode_color which had incorrect response syntax
- Replace with usage notes showing how to access mode colors in templates
- Blueprints and automations access colors directly via templates
- Fixes 'extra keys not allowed @ data['sequence'][0]['response']' error
2025-12-20 14:41:53 -08:00
ea426e56ef Fix input_text max length constraint for mode colors
- Add max: 255 parameter to adaptive_lighting_mode_colors input_text
- Minify JSON to fit within Home Assistant's 100 character default limit
- Remove adaptive_lighting_mode_settings input_text (too long, convert to comments)
- Remove get_mode_settings script (no longer needed)
- Fix template syntax: use states() instead of state_attr() for input_text values
- Convert mode settings to reference documentation comments

This fixes the 'Initial value length not in range 0-100' error from Home Assistant.
2025-12-20 14:38:21 -08:00
2cb34c7c9f Add Adaptive Lighting Mode System foundation (Phase 1)
Implement the foundation for a comprehensive mode-based lighting control
system for Inovelli Blue Dimmer Switches with Adaptive Lighting integration.

This Phase 1 implementation includes:

- Global mode definitions package (packages/adaptive_lighting_global.yaml)
  containing ROYGBIV color scheme mappings and mode settings for all
  standard modes (Adaptive, Reading, Theater, Sleep, etc.)

- Inovelli mode cycling blueprint (blueprints/automation/inovelli_mode_cycling.yaml)
  enabling config button to cycle through lighting modes with LED feedback

- Updated README with system overview, features, and quick start guide

The system provides room-specific lighting modes with visual LED feedback,
config button control, and git-trackable configuration via Home Assistant
packages.

Next phases will add mode application automations, button action blueprints,
presence integration, and comprehensive documentation.
2025-12-20 14:22:24 -08:00
25 changed files with 4147 additions and 127 deletions

6
.gitignore vendored Normal file
View File

@@ -0,0 +1,6 @@
.DS_Store
.idea
*.log
tmp/
thoughts

53
CHANGELOG.md Normal file
View File

@@ -0,0 +1,53 @@
# Changelog
All notable changes to the Adaptive Lighting Mode System will be documented in
this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [1.0.0] - 2025-12-20
### Added
**Blueprints**:
- `inovelli_mode_cycling.yaml` - Config button cycles through lighting modes
with LED feedback
- `inovelli_button_actions.yaml` - Multi-tap brightness controls with
auto-reset
- `presence_mode_reset.yaml` - Auto-reset modes and manual control when room
empty
**Package Templates**:
- `adaptive_lighting_global.yaml` - Shared mode definitions and color mappings
- `adaptive_lighting_bedroom_template.yaml` - Complete bedroom example with 5
modes
- `adaptive_lighting_living_room_template.yaml` - Living room example with
entertainment modes
- `adaptive_lighting_simple_template.yaml` - Minimal template for simple rooms
**Documentation**:
- `PACKAGE_SETUP_GUIDE.md` - Setup instructions and version control guide
- `ROOM_CONFIGURATION_GUIDE.md` - Room-by-room configuration examples
- `HARDWARE_TESTING_CHECKLIST.md` - Comprehensive testing checklist
- Updated `README.md` with system overview and quick start
**Features**:
- Room-specific mode definitions (Adaptive, Reading, Theater, Sleep, etc.)
- Visual LED feedback using ROYGBIV color scheme
- Weekend mode with automatic sunrise/sunset adjustments
- Multi-tap button actions (boost, max, night light)
- Presence-based auto-reset
- Version-controlled package-based configuration
### Technical Details
- Zigbee2MQTT integration for Inovelli Blue VZM31-SN switches
- Home Assistant Adaptive Lighting integration required
- Package-based architecture for easy version control
- Template-driven room setup for scalability
### Known Limitations
- Zigbee2MQTT only (Z-Wave JS requires different MQTT topics)
- Settings from `adaptive_lighting.change_switch_settings` reset on HA restart
- Requires manual Inovelli switch configuration (Smart Bulb Mode, buttonDelay)

View File

@@ -0,0 +1,110 @@
# Hardware Testing Checklist
## Prerequisites
- [ ] Inovelli Blue Dimmer VZM31-SN paired with Zigbee2MQTT
- [ ] Switch in Smart Bulb Mode (select.xxx_smart_bulb_mode = "Smart Bulb
Mode")
- [ ] buttonDelay set to 500ms or 700ms (select.xxx_button_delay)
- [ ] Smart bulbs powered and responsive
- [ ] Adaptive Lighting integration installed and configured
- [ ] All packages and blueprints loaded
## Switch Configuration Tests
- [ ] Smart Bulb Mode enabled: Load always powered
- [ ] LED bar displays color correctly
- [ ] LED intensity acceptable (adjust if too bright/dim)
- [ ] Button presses detected: event.xxx_action updates
- [ ] Single tap: Shows "up_single" or "down_single"
- [ ] Double tap: Shows "up_double" or "down_double" reliably
- [ ] Triple tap: Shows "up_triple" or "down_triple" reliably
- [ ] Config button: Shows "config_single"
## Mode Cycling Tests
- [ ] Config button press triggers automation
- [ ] Mode cycles through all available modes
- [ ] Mode cycles back to first after last mode
- [ ] input_select updates in UI
- [ ] LED color changes to match mode
- [ ] LED flash pulse visible (3 seconds)
- [ ] Colors distinguishable for each mode
- [ ] Cycle works from any starting mode
## Mode Application Tests
For each mode:
- [ ] Adaptive: AL settings reset to configuration defaults
- [ ] Reading: Brightness increases, color cools
- [ ] Theater: Brightness decreases, color warms
- [ ] Sleep: Very dim, red/amber color
- [ ] Manual Override: AL paused, manual control enabled
## Button Action Tests
- [ ] Double tap up: Brightness boosts +50%
- [ ] Double tap up: Color temperature increases +1000K
- [ ] Double tap down: Returns to AL control immediately
- [ ] Triple tap up: Sets 100% brightness, 4000K (neutral)
- [ ] Triple tap down: Sets 5% brightness, warm red
- [ ] Auto-reset: Returns to AL after configured timeout
- [ ] Auto-reset: Works after boost action
- [ ] Auto-reset: Works after max brightness
- [ ] Auto-reset: Works after night light
## Weekend Mode Tests (if configured)
- [ ] Enables automatically Friday 10pm
- [ ] Disables automatically Sunday 10pm
- [ ] Sunrise time shifts when enabled
- [ ] Max brightness reduces when enabled
- [ ] Settings restore when disabled
- [ ] Triple-tap toggle works (if configured)
- [ ] LED flash confirms toggle
## Presence Integration Tests (if configured)
- [ ] Presence sensor triggers correctly
- [ ] Lights turn on when occupied
- [ ] Lights stay on while occupied
- [ ] Manual control resets after room empty
- [ ] Mode resets after room empty (if configured)
- [ ] Delay timing is appropriate
- [ ] Works with multiple sensors (OR logic)
## Edge Cases and Failure Modes
- [ ] Rapid button presses don't cause errors
- [ ] Mode change while lights off doesn't error
- [ ] Switching modes rapidly doesn't break AL
- [ ] Zigbee network congestion doesn't cause issues
- [ ] Home Assistant restart preserves mode
- [ ] AL switch off doesn't break mode system
- [ ] Invalid mode name doesn't crash automation
- [ ] Missing entity gracefully fails
## Performance Tests
- [ ] Mode change response < 1 second
- [ ] LED update response < 1 second
- [ ] Button action response < 1 second
- [ ] AL adaptation smooth (no flicker)
- [ ] No automation trace errors
- [ ] No excessive log warnings
## Multi-Room Tests
- [ ] Multiple rooms work independently
- [ ] Mode cycling doesn't affect other rooms
- [ ] LED colors consistent across rooms
- [ ] Performance acceptable with many rooms
- [ ] Global package shared correctly
## Documentation Accuracy
- [ ] All entity IDs in examples are correct format
- [ ] Zigbee2MQTT topics match actual topics
- [ ] Service calls work as documented
- [ ] Examples produce expected behavior
- [ ] Troubleshooting guide solves real issues

View File

@@ -0,0 +1,121 @@
# Inovelli Blue Series Dimmer Switch - Zigbee2MQTT Reference
This directory contains technical specifications for Inovelli Blue Series Dimmer Switch (VZM31-SN) when used with Zigbee2MQTT, organized by theme for selective context loading.
## Parameter Categories
### [Dimming & Ramp Control](inovelli/dimming-and-ramp.md)
Properties controlling dimming speeds and ramp rates for both local (physical paddle) and remote (hub/automation) control.
- **Properties**: dimmingSpeed*, rampRate*
- **Use cases**: Fine-tuning dimming behavior, creating smooth lighting transitions
### [Brightness Levels](inovelli/brightness-levels.md)
Properties defining brightness limits, default levels, and multi-tap brightness targets.
- **Properties**: minimumLevel, maximumLevel, defaultLevel*, invertSwitch, brightnessLevelForDoubleTap*
- **Use cases**: Setting brightness constraints, configuring default on levels, switch inversion
### [Power & Energy Monitoring](inovelli/power-monitoring.md)
Properties for power measurement, reporting thresholds, and energy monitoring.
- **Properties**: power, energy, activePowerReports, activeEnergyReports, periodicPowerAndEnergyReports
- **Use cases**: Power consumption tracking, energy usage analytics, reporting intervals
### [LED Configuration](inovelli/led-configuration.md)
Properties controlling LED strip colors and intensity for individual LEDs and global defaults, plus LED effects.
- **Properties**: led_effect, individual_led_effect, ledColorWhen*, ledIntensityWhen*, defaultLed*
- **Use cases**: LED notifications, status indicators, custom color schemes, animated effects
### [Switch Configuration](inovelli/switch-config.md)
Properties defining switch type, operational modes, and hardware configuration.
- **Properties**: switchType, buttonDelay, smartBulbMode, outputMode, powerType, ledBarScaling
- **Use cases**: 3-way setup, smart bulb mode, non-neutral wiring, on/off mode
### [Protection & Safety](inovelli/protection-safety.md)
Properties for device protection, temperature monitoring, and access control.
- **Properties**: internalTemperature, overheat, localProtection, remoteProtection
- **Use cases**: Child locks, overheat protection, disabling physical/remote control
### [Timers & Automation](inovelli/timers-automation.md)
Properties for time-based automation features.
- **Properties**: autoTimerOff, loadLevelIndicatorTimeout, doubleTapUpToParam55, doubleTapDownToParam56
- **Use cases**: Auto-off timers, LED timeout, double-tap shortcuts
### [Advanced Features](inovelli/advanced-features.md)
Properties for advanced configuration, bindings, and special modes.
- **Properties**: fanControlMode, singleTapBehavior, auxSwitchUniqueScenes, bindingOffToOnSyncLevel
- **Use cases**: Fan control, scene control, firmware updates, custom behaviors
## Quick Property Lookup
| Property | Category |
|----------|----------|
| dimmingSpeedUpRemote, dimmingSpeedUpLocal | Dimming & Ramp |
| dimmingSpeedDownRemote, dimmingSpeedDownLocal | Dimming & Ramp |
| rampRateOffToOnRemote, rampRateOffToOnLocal | Dimming & Ramp |
| rampRateOnToOffRemote, rampRateOnToOffLocal | Dimming & Ramp |
| minimumLevel, maximumLevel | Brightness Levels |
| defaultLevelLocal, defaultLevelRemote | Brightness Levels |
| invertSwitch, stateAfterPowerRestored | Brightness Levels |
| brightnessLevelForDoubleTapUp, brightnessLevelForDoubleTapDown | Brightness Levels |
| autoTimerOff | Timers & Automation |
| loadLevelIndicatorTimeout | Timers & Automation |
| doubleTapUpToParam55, doubleTapDownToParam56 | Timers & Automation |
| power, energy | Power Monitoring |
| activePowerReports, activeEnergyReports | Power Monitoring |
| periodicPowerAndEnergyReports | Power Monitoring |
| quickStartTime, quickStartLevel | Power Monitoring |
| led_effect, individual_led_effect | LED Configuration |
| ledColorWhenOn, ledColorWhenOff | LED Configuration |
| ledIntensityWhenOn, ledIntensityWhenOff | LED Configuration |
| defaultLed1-7ColorWhenOn/Off | LED Configuration |
| defaultLed1-7IntensityWhenOn/Off | LED Configuration |
| ledBarScaling, onOffLedMode | LED Configuration |
| switchType, buttonDelay | Switch Configuration |
| smartBulbMode, outputMode | Switch Configuration |
| powerType, dimmingMode, relayClick | Switch Configuration |
| higherOutputInNonNeutral | Switch Configuration |
| internalTemperature, overheat | Protection & Safety |
| localProtection, remoteProtection | Protection & Safety |
| fanControlMode, singleTapBehavior | Advanced Features |
| auxSwitchUniqueScenes, bindingOffToOnSyncLevel | Advanced Features |
| deviceBindNumber, firmwareUpdateInProgressIndicator | Advanced Features |
| doubleTapClearNotifications, fanLedLevelType | Advanced Features |
## Zigbee2MQTT Integration
These properties are exposed by Zigbee2MQTT and can be accessed in Home Assistant as:
- **Entities**: `light.switch_name` (state, brightness)
- **Sensors**: `sensor.switch_name_power`, `sensor.switch_name_energy`
- **Numbers**: `number.switch_name_dimming_speed_up_remote`, etc.
- **Selects**: `select.switch_name_switch_type`, etc.
- **Actions**: `mqtt.publish` to set LED effects via `led_effect` and `individual_led_effect`
## Setting Properties
Properties can be set via:
1. **Home Assistant UI**: Using the exposed number/select entities
2. **Services**: Using `number.set_value` or `select.select_option`
3. **MQTT**: Publishing directly to `zigbee2mqtt/[device_name]/set`
Example MQTT publish for LED effect:
```yaml
service: mqtt.publish
data:
topic: zigbee2mqtt/bedroom_switch/set
payload: '{"led_effect": {"effect": "pulse", "color": 170, "level": 100, "duration": 255}}'
```
## Source
- Official Inovelli documentation: https://help.inovelli.com/en/articles/8189241-blue-series-dimmer-switch-parameters
- Zigbee2MQTT device definition: Model VZM31-SN
## Usage for LLM Agents
Each category file contains detailed property specifications including:
- Property name as exposed by Zigbee2MQTT
- Value range and units
- Default value
- Detailed description
- Usage notes and Home Assistant examples
Load only the category files relevant to your current task to minimize context usage.

220
PACKAGE_SETUP_GUIDE.md Normal file
View File

@@ -0,0 +1,220 @@
# Package Setup Guide
## Overview
This guide explains how to set up Home Assistant packages for the Adaptive
Lighting Mode System and configure version control.
## What Are Packages?
Packages allow you to organize Home Assistant configuration into multiple YAML
files instead of one giant `configuration.yaml`. Each package file can contain
automations, helpers, scripts, and other entities related to a specific feature
or room.
**Benefits**:
- Organize configuration by room or feature
- Version control specific areas independently
- Easier to share and reuse configurations
- Keep `configuration.yaml` clean and minimal
## Prerequisites
- Home Assistant installed and running
- SSH or file editor access to your HA configuration directory
- Git installed (optional, for version control)
- Adaptive Lighting integration installed via HACS
## Step 1: Enable Packages in Home Assistant
**1.1 Edit your `configuration.yaml`**
Add this line to the top of your `configuration.yaml`:
```yaml
homeassistant:
packages: !include_dir_named packages/
```
**1.2 Create the packages directory**
SSH into your Home Assistant instance or use File Editor add-on:
```bash
cd /config
mkdir packages
```
**1.3 Restart Home Assistant**
Settings → System → Restart Home Assistant
## Step 2: Install Global Definitions
**2.1 Copy the global package**
Download or copy `packages/adaptive_lighting_global.yaml` from this repository
to your `/config/packages/` directory.
**2.2 Reload YAML configuration**
Developer Tools → YAML → Reload all YAML configuration
**2.3 Verify helpers exist**
Settings → Devices & Services → Helpers
You should see:
- `input_text.adaptive_lighting_mode_colors`
- `input_text.adaptive_lighting_settings_adaptive`
- `input_text.adaptive_lighting_settings_reading`
- `input_text.adaptive_lighting_settings_relaxing`
- `input_text.adaptive_lighting_settings_sleep`
- And several more mode settings helpers
## Step 3: Import Blueprints
**3.1 Import via UI**
Settings → Automations & Scenes → Blueprints → Import Blueprint
Import these URLs:
```
https://git.johnogle.info/johno/home-assistant-blueprints/raw/branch/main/blueprints/automation/inovelli_mode_cycling.yaml
https://git.johnogle.info/johno/home-assistant-blueprints/raw/branch/main/blueprints/automation/inovelli_button_actions.yaml
https://git.johnogle.info/johno/home-assistant-blueprints/raw/branch/main/blueprints/automation/presence_mode_reset.yaml
```
**3.2 Verify blueprints imported**
Settings → Automations & Scenes → Blueprints
You should see all three blueprints listed.
## Step 4: Configure Your First Room
**4.1 Choose a template**
Select the appropriate template for your room type:
- Bedroom: `packages/adaptive_lighting_bedroom_template.yaml`
- Living room: `packages/adaptive_lighting_living_room_template.yaml`
- Simple (bathroom, closet): `packages/adaptive_lighting_simple_template.yaml`
**4.2 Copy and customize**
```bash
cd /config/packages
cp adaptive_lighting_bedroom_template.yaml adaptive_lighting_master_bedroom.yaml
```
Edit the file and update:
- Replace "bedroom" with "master_bedroom" throughout
- Update entity IDs (search for # UPDATE THIS comments)
- Adjust available modes if desired
- Customize mode settings
**4.3 Reload configuration**
Developer Tools → YAML → Reload all YAML configuration
**4.4 Create blueprint automations**
Settings → Automations & Scenes → Create Automation → Use Blueprint
Create automations for:
1. Inovelli Mode Cycling (config button)
2. Inovelli Button Actions (multi-tap)
3. Presence Mode Reset (if you have occupancy sensors)
## Step 5: Version Control Setup (Optional)
**5.1 Initialize git repository**
```bash
cd /config
git init
```
**5.2 Create .gitignore**
```bash
cat > .gitignore << 'EOF'
# Secrets and sensitive data
secrets.yaml
*.db
*.db-shm
*.db-wal
*.log
# Generated files
*.pyc
__pycache__/
.storage/
.cloud/
.google.token
# Add-on data
.ssh/
.vscode/
# Keep these version controlled:
# - packages/
# - automations.yaml
# - configuration.yaml
# - blueprints/
EOF
```
**5.3 Commit initial setup**
```bash
git add packages/ automations.yaml configuration.yaml
git commit -m "Initial adaptive lighting mode system setup"
```
**5.4 Add remote (optional)**
```bash
git remote add origin your-git-repo-url
git push -u origin main
```
## Troubleshooting
### Packages not loading
**Symptom**: Helpers don't appear after reloading
**Solutions**:
- Check `configuration.yaml` has packages line
- Verify packages directory exists at `/config/packages/`
- Check YAML syntax: `yamllint /config/packages/*.yaml`
- Look for errors in Settings → System → Logs
### Entity IDs don't match
**Symptom**: Automations fail because entities not found
**Solutions**:
- Go to Settings → Devices & Services → MQTT
- Find your Inovelli switch device
- Note the exact entity IDs (event.xxx_action,
number.xxx_led_color_when_on)
- Update package file with correct entity IDs
- Reload YAML
### Blueprints not working
**Symptom**: Automation from blueprint doesn't trigger
**Solutions**:
- Check automation trace: Settings → Automations → [your automation] →
Traces
- Verify trigger entity is correct
- Ensure Inovelli buttonDelay is set to >= 500ms
- Test button press in Developer Tools → States (watch event.xxx_action)
## Next Steps
See [ROOM_CONFIGURATION_GUIDE.md](ROOM_CONFIGURATION_GUIDE.md) for detailed
room setup examples.

View File

@@ -1,5 +1,73 @@
# Home Assistant Blueprints # Home Assistant Blueprints
## Adaptive Lighting Mode System
A comprehensive mode-based lighting control system for Inovelli Blue Dimmer
Switches with Adaptive Lighting integration.
### Features
- **Room-specific modes**: Define custom lighting modes per room (Reading,
Theater, Sleep, etc.)
- **Visual LED feedback**: LED bar color indicates current mode
- **Config button control**: Press config button to cycle through modes
- **Multi-tap actions**: Double-tap boost, triple-tap max/night light
- **Adaptive Lighting integration**: Dynamic brightness and color following sun
position
- **Version controlled**: All configuration in git-trackable package files
### System Components
**Blueprints** (Reusable):
- `inovelli_mode_cycling.yaml` - Config button cycles modes with LED feedback
- `inovelli_button_actions.yaml` - Multi-tap brightness controls
- `presence_mode_reset.yaml` - Auto-reset on room exit
**Packages** (Templates):
- `adaptive_lighting_global.yaml` - Shared mode definitions and colors
- `adaptive_lighting_bedroom_template.yaml` - Complete bedroom example
- `adaptive_lighting_living_room_template.yaml` - Living room example
- `adaptive_lighting_simple_template.yaml` - Minimal single-mode room
### Setup Guide
**Quick Start**:
1. Install Adaptive Lighting integration via HACS
2. Follow [PACKAGE_SETUP_GUIDE.md](PACKAGE_SETUP_GUIDE.md) to enable packages
3. Copy templates from `packages/` directory
4. Import blueprints via UI
5. See [ROOM_CONFIGURATION_GUIDE.md](ROOM_CONFIGURATION_GUIDE.md) for examples
**Documentation**:
- [PACKAGE_SETUP_GUIDE.md](PACKAGE_SETUP_GUIDE.md) - Initial setup and version
control
- [ROOM_CONFIGURATION_GUIDE.md](ROOM_CONFIGURATION_GUIDE.md) - Room-by-room
examples
- [ADAPTIVE_LIGHTING_CONTROL_SYSTEM_DESIGN.md](ADAPTIVE_LIGHTING_CONTROL_SYSTEM_DESIGN.md) -
Complete system design
**Files**:
- `packages/adaptive_lighting_global.yaml` - Required for all rooms
- `packages/adaptive_lighting_bedroom_template.yaml` - Template for bedrooms
- `packages/adaptive_lighting_living_room_template.yaml` - Template for common
areas
- `packages/adaptive_lighting_simple_template.yaml` - Template for simple rooms
- `blueprints/automation/inovelli_mode_cycling.yaml` - Config button mode
cycling
- `blueprints/automation/inovelli_button_actions.yaml` - Multi-tap actions
- `blueprints/automation/presence_mode_reset.yaml` - Auto-reset on room exit
### Import URLs
**Blueprints**:
```
https://git.johnogle.info/johno/home-assistant-blueprints/raw/branch/main/blueprints/automation/inovelli_mode_cycling.yaml
https://git.johnogle.info/johno/home-assistant-blueprints/raw/branch/main/blueprints/automation/inovelli_button_actions.yaml
https://git.johnogle.info/johno/home-assistant-blueprints/raw/branch/main/blueprints/automation/presence_mode_reset.yaml
```
---
## Occupancy Controlled Lights Blueprint ## Occupancy Controlled Lights Blueprint
Automatically control lights based on occupancy sensors with adaptive lighting support. Perfect for any room where you want lights to turn on when someone enters and turn off when they leave. Automatically control lights based on occupancy sensors with adaptive lighting support. Perfect for any room where you want lights to turn on when someone enters and turn off when they leave.

200
ROOM_CONFIGURATION_GUIDE.md Normal file
View File

@@ -0,0 +1,200 @@
# Room Configuration Guide
Complete examples of configuring different room types with the Adaptive
Lighting Mode System.
## Example 1: Master Bedroom
**Goal**: Full control with optional AL, reading/sleep modes, weekend mode
**Hardware**:
- Inovelli Blue Dimmer: `bedroom_switch` (Zigbee2MQTT name)
- Lights: `light.bedroom_ceiling`, `light.bedroom_lamp_1`,
`light.bedroom_lamp_2`
- No presence sensor (privacy)
**Adaptive Lighting Configuration** (in `configuration.yaml`):
```yaml
adaptive_lighting:
- name: bedroom
lights:
- light.bedroom_ceiling
- light.bedroom_lamp_1
- light.bedroom_lamp_2
interval: 90
transition: 45
take_over_control: true
autoreset_control_seconds: 3600 # 1 hour gentle reset
```
**Package File** (`packages/adaptive_lighting_master_bedroom.yaml`):
Copy from `adaptive_lighting_bedroom_template.yaml`, customize:
- Modes: Adaptive, Reading, Relaxing, Sleep, Manual Override
- Weekend mode enabled
- Default mode: Adaptive
**Blueprint Automations** (create via UI):
1. **Config Button Mode Cycling**:
- Blueprint: Inovelli Mode Cycling
- Switch Action Event: `event.bedroom_switch_action`
- Mode Input Select: `input_select.bedroom_lighting_mode`
- LED Color Entity: `number.bedroom_switch_led_color_when_on`
- Zigbee2MQTT Device Name: `bedroom_switch`
2. **Button Actions**:
- Blueprint: Inovelli Button Actions
- Switch Action Event: `event.bedroom_switch_action`
- AL Switch: `switch.adaptive_lighting_bedroom`
- Target Lights: `light.bedroom_ceiling`, `light.bedroom_lamp_1`,
`light.bedroom_lamp_2`
- Auto-Reset: 30 minutes
**Testing**:
- [ ] Press config button → mode cycles through all 5 modes
- [ ] LED changes color for each mode
- [ ] Double-tap up → brightness boosts
- [ ] Weekend mode enables Friday 10pm
- [ ] Sunrise shifts to 10am on weekend
## Example 2: Living Room (Common Area)
**Goal**: Entertainment modes (Theater, Party), presence control
**Hardware**:
- Inovelli Blue Dimmer: `living_room_switch`
- Lights: `light.living_room_ceiling`, `light.living_room_lamp_1`
- Presence: `binary_sensor.living_room_occupancy`
**Package File** (`packages/adaptive_lighting_living_room.yaml`):
Copy from `adaptive_lighting_living_room_template.yaml`
- Modes: Adaptive, Theater, Party, Reading
- Auto-reset mode to Adaptive when lights turn off
**Blueprint Automations**:
1. **Config Button Mode Cycling** (same as bedroom)
2. **Button Actions** (same as bedroom, adjust auto-reset to 15 min)
3. **Presence Mode Reset**:
- Occupancy Sensors: `binary_sensor.living_room_occupancy`
- Empty Delay: 5 minutes
- AL Switch: `switch.adaptive_lighting_living_room`
- Mode Input Select: `input_select.living_room_lighting_mode`
- Default Mode: `Adaptive`
**Testing**:
- [ ] Enter room → lights turn on (via separate occupancy automation)
- [ ] Press config button → cycles through 4 modes
- [ ] Set to Theater mode, leave room → after 5 min, resets to Adaptive
- [ ] Manual boost → leave room → manual control clears
## Example 3: Bathroom (Simple)
**Goal**: Always Adaptive, brightness boost only
**Hardware**:
- Inovelli Blue Dimmer: `bathroom_switch`
- Lights: `light.bathroom_ceiling`, `light.bathroom_vanity`
- Presence: `binary_sensor.bathroom_occupancy`
**Package File** (`packages/adaptive_lighting_bathroom.yaml`):
Copy from `adaptive_lighting_simple_template.yaml`
- No modes (Adaptive only)
- No weekend mode
- Simple reset on presence end
**Blueprint Automations**:
1. **Button Actions ONLY**:
- Double-tap up: Boost brightness
- Triple-tap down: Night light
- Auto-reset: 10 minutes
2. **Presence Mode Reset**:
- Reset manual control when empty 5 minutes
- No mode reset (no input_select)
**Testing**:
- [ ] Double-tap up → brightness boosts
- [ ] Leave bathroom 5 min → manual control clears
- [ ] Triple-tap down → night light mode
- [ ] No config button action (not configured)
## Entity ID Quick Reference
### Finding Your Entities
**Inovelli Switch Entities** (via Zigbee2MQTT):
```
event.{device_name}_action # Button presses (event entity)
number.{device_name}_led_color_when_on
number.{device_name}_led_color_when_off
number.{device_name}_led_intensity_when_on
select.{device_name}_smart_bulb_mode
select.{device_name}_button_delay
```
**Adaptive Lighting Entities**:
```
switch.adaptive_lighting_{name}
switch.adaptive_lighting_sleep_mode_{name}
switch.adaptive_lighting_adapt_brightness_{name}
switch.adaptive_lighting_adapt_color_{name}
```
**Your Input Helpers**:
```
input_select.{room}_lighting_mode
input_boolean.{room}_weekend_mode
```
## Common Customizations
### Add a New Mode
1. Edit package file, add mode to `input_select`:
```yaml
input_select:
bedroom_lighting_mode:
options:
- "Adaptive"
- "Reading"
- "NEW MODE HERE" # Add this
```
2. Add color mapping to global package (or use existing color)
3. Add mode application to automation:
```yaml
- conditions: "{{ mode == 'NEW MODE HERE' }}"
sequence:
- service: adaptive_lighting.change_switch_settings
data:
min_brightness: 50
max_brightness: 80
# ... settings
```
4. Reload YAML configuration
### Change Auto-Reset Timeout
Edit blueprint automation via UI:
- Settings → Automations → [Your button action automation]
- Click Edit
- Adjust "Auto-Reset Timeout" slider
- Save
### Disable Weekend Mode
Comment out weekend mode automations in package file:
```yaml
# - id: bedroom_weekend_mode_auto_enable
# alias: "Bedroom: Enable Weekend Mode Friday/Saturday"
# # ... entire automation
```
Reload YAML configuration.

View File

@@ -0,0 +1,163 @@
---
# blueprints/automation/inovelli_button_actions.yaml
#
# Inovelli Button Actions for Adaptive Lighting
#
# Implements multi-tap actions:
# - Double tap up: Brightness boost (+50% from current AL setting)
# - Double tap down: Return to Adaptive Lighting control
# - Triple tap up: Maximum brightness (100%, neutral white)
# - Triple tap down: Night light mode (5%, warm red)
#
# Features:
# - Auto-reset after configurable timeout
# - Reads current AL settings for relative boost
# - Works with any Inovelli Blue Dimmer via Zigbee2MQTT
#
# Requirements:
# - Inovelli Blue Dimmer (VZM31-SN) with buttonDelay >= 500ms
# - Adaptive Lighting switch for the room
# - Light entities to control
#
# Reference: ADAPTIVE_LIGHTING_CONTROL_SYSTEM_DESIGN.md lines 308-421
blueprint:
name: Inovelli Button Actions for Adaptive Lighting
description: Multi-tap brightness controls with adaptive lighting integration
domain: automation
input:
switch_action_event:
name: Switch Action Event
description: Event entity that reports button presses (event.xxx_action)
selector:
entity:
domain: event
adaptive_lighting_switch:
name: Adaptive Lighting Switch
description: The AL switch entity for this room
selector:
entity:
domain: switch
integration: adaptive_lighting
target_lights:
name: Target Lights
description: Light entities to control
selector:
target:
entity:
domain: light
auto_reset_minutes:
name: Auto-Reset Timeout (minutes)
description: Minutes before returning to AL after manual boost
default: 10
selector:
number:
min: 0
max: 120
step: 5
unit_of_measurement: minutes
mode: restart
max_exceeded: silent
trigger:
- platform: state
entity_id: !input switch_action_event
condition:
- condition: template
value_template: >-
{{
state_attr(trigger.entity_id, 'event_type') in
['up_double', 'down_double', 'up_triple', 'down_triple']
}}
action:
- variables:
action: "{{ state_attr(trigger.entity_id, 'event_type') }}"
al_switch: !input adaptive_lighting_switch
lights: !input target_lights
reset_minutes: !input auto_reset_minutes
- choose:
# ========================================================================
# DOUBLE TAP UP - Brightness Boost
# ========================================================================
- conditions: "{{ action == 'up_double' }}"
sequence:
- variables:
current_brightness: >-
{{ state_attr(al_switch, 'brightness_pct') | float(50) }}
boosted_brightness: "{{ [current_brightness + 50, 100] | min }}"
current_color_temp: >-
{{ state_attr(al_switch, 'color_temp_kelvin') | int(4000) }}
boosted_color_temp: >-
{{ [current_color_temp + 1000, 5500] | min }}
- service: light.turn_on
target: "{{ lights }}"
data:
brightness_pct: "{{ boosted_brightness }}"
color_temp_kelvin: "{{ boosted_color_temp }}"
transition: 1
# Auto-reset after timeout
- delay:
minutes: "{{ reset_minutes }}"
- service: adaptive_lighting.set_manual_control
data:
entity_id: "{{ al_switch }}"
manual_control: false
# ========================================================================
# DOUBLE TAP DOWN - Return to AL
# ========================================================================
- conditions: "{{ action == 'down_double' }}"
sequence:
- service: adaptive_lighting.set_manual_control
data:
entity_id: "{{ al_switch }}"
manual_control: false
# ========================================================================
# TRIPLE TAP UP - Max Brightness (Neutral White)
# ========================================================================
- conditions: "{{ action == 'up_triple' }}"
sequence:
- service: light.turn_on
target: "{{ lights }}"
data:
brightness_pct: 100
color_temp_kelvin: 4000
transition: 0.5
# Auto-reset after timeout
- delay:
minutes: "{{ reset_minutes }}"
- service: adaptive_lighting.set_manual_control
data:
entity_id: "{{ al_switch }}"
manual_control: false
# ========================================================================
# TRIPLE TAP DOWN - Night Light
# ========================================================================
- conditions: "{{ action == 'down_triple' }}"
sequence:
- service: light.turn_on
target: "{{ lights }}"
data:
brightness_pct: 5
rgb_color: [255, 50, 0]
transition: 1
# Auto-reset after timeout
- delay:
minutes: "{{ reset_minutes }}"
- service: adaptive_lighting.set_manual_control
data:
entity_id: "{{ al_switch }}"
manual_control: false

View File

@@ -0,0 +1,96 @@
# blueprints/automation/inovelli_mode_cycling.yaml
#
# Inovelli Config Button Mode Cycling
#
# Cycles through lighting modes when the config button is pressed on an
# Inovelli Blue Dimmer Switch (VZM31-SN) via Zigbee2MQTT.
#
# Features:
# - Cycles through available modes in input_select
# - Updates LED color to match new mode (ROYGBIV scheme)
# - Flashes LED to confirm mode change (0.5-second pulse)
#
# Requirements:
# - Inovelli Blue Dimmer (VZM31-SN) paired with Zigbee2MQTT
# - input_select helper with available modes
# - packages/adaptive_lighting_global.yaml for mode colors
#
# Reference: ADAPTIVE_LIGHTING_CONTROL_SYSTEM_DESIGN.md lines 144-182
blueprint:
name: Inovelli Config Button Mode Cycling
description: Press config button to cycle through lighting modes with LED feedback
domain: automation
input:
switch_action_event:
name: Switch Action Event
description: The event entity that reports button presses (event.xxx_action)
selector:
entity:
domain: event
mode_input_select:
name: Mode Input Select
description: The input_select helper that tracks current lighting mode
selector:
entity:
domain: input_select
led_color_entity:
name: LED Color Entity
description: The number entity for LED color when on (number.xxx_led_color_when_on)
selector:
entity:
domain: number
zigbee2mqtt_device_name:
name: Zigbee2MQTT Device Name
description: The device name in Zigbee2MQTT (for LED flash effect via MQTT). Example "bedroom_switch"
selector:
text:
mode: single
max_exceeded: silent
trigger:
- platform: state
entity_id: !input switch_action_event
condition:
- condition: state
entity_id: !input switch_action_event
attribute: event_type
state: "config_single"
action:
- variables:
mode_select: !input mode_input_select
zigbee2mqtt_device_name: !input zigbee2mqtt_device_name
current_mode: "{{ states(mode_select) }}"
available_modes: "{{ state_attr(mode_select, 'options') }}"
current_index: "{{ available_modes.index(current_mode) }}"
next_index: "{{ (current_index + 1) % (available_modes | length) }}"
next_mode: "{{ available_modes[next_index] }}"
mode_colors: "{{ states('input_text.adaptive_lighting_mode_colors') | from_json }}"
next_color: "{{ mode_colors.get(next_mode, 170) }}"
# Change to next mode
- service: input_select.select_option
target:
entity_id: !input mode_input_select
data:
option: "{{ next_mode }}"
# Update LED color
- service: number.set_value
target:
entity_id: !input led_color_entity
data:
value: "{{ next_color }}"
# Flash LED to confirm mode change (0.5-second pulse)
- service: mqtt.publish
data:
topic: "zigbee2mqtt/{{ zigbee2mqtt_device_name }}/set"
payload: >-
{"led_effect": {"effect": "pulse", "color": {{ next_color }}, "level": 100, "duration": 0.5}}

View File

@@ -0,0 +1,116 @@
---
# blueprints/automation/presence_mode_reset.yaml
#
# Presence-Based Mode and Manual Control Reset
#
# Automatically resets lighting mode and clears manual control when room
# becomes unoccupied for a configurable duration.
#
# Use Cases:
# - Reset Theater mode to Adaptive when leaving living room
# - Clear manual brightness boosts when bedroom becomes empty
# - Return bathroom to normal AL after presence ends
#
# Requirements:
# - Binary sensor(s) for occupancy/presence detection
# - Adaptive Lighting switch (optional - for manual control reset)
# - Mode input_select (optional - for mode reset)
#
# Reference: ADAPTIVE_LIGHTING_CONTROL_SYSTEM_DESIGN.md lines 437-451,
# 709-719
blueprint:
name: Presence-Based Mode and Manual Control Reset
description: >-
Reset lighting modes and AL manual control when room becomes empty
domain: automation
input:
occupancy_sensors:
name: Occupancy Sensors
description: Binary sensor(s) that detect room occupancy
selector:
entity:
domain: binary_sensor
device_class: occupancy
multiple: true
empty_delay:
name: Empty Delay
description: How long room must be empty before reset
default: 5
selector:
number:
min: 0
max: 60
step: 1
unit_of_measurement: minutes
adaptive_lighting_switch:
name: Adaptive Lighting Switch (Optional)
description: AL switch to reset manual control. Leave empty to skip.
default: {}
selector:
entity:
domain: switch
integration: adaptive_lighting
mode_input_select:
name: Mode Input Select (Optional)
description: Mode selector to reset to Adaptive. Leave empty to skip.
default: {}
selector:
entity:
domain: input_select
default_mode:
name: Default Mode
description: Mode to reset to when room becomes empty
default: "Adaptive"
selector:
text:
mode: restart
trigger:
- platform: state
entity_id: !input occupancy_sensors
to: 'off'
for:
minutes: !input empty_delay
action:
- variables:
occupancy_sensors: !input occupancy_sensors
al_switch: !input adaptive_lighting_switch
mode_select: !input mode_input_select
default_mode: !input default_mode
# Ensure ALL sensors are off (room is truly empty)
- condition: template
value_template: >-
{{
expand(occupancy_sensors) |
selectattr('state', 'eq', 'on') |
list | count == 0
}}
# Reset manual control if AL switch provided
- if:
- condition: template
value_template: "{{ al_switch not in [none, {}, ''] }}"
then:
- service: adaptive_lighting.set_manual_control
data:
entity_id: "{{ al_switch }}"
manual_control: false
# Reset mode if input_select provided
- if:
- condition: template
value_template: "{{ mode_select not in [none, {}, ''] }}"
then:
- service: input_select.select_option
target:
entity_id: "{{ mode_select }}"
data:
option: "{{ default_mode }}"

View File

@@ -0,0 +1,66 @@
---
# examples/test_room_config.yaml
#
# Test configuration for validating the Adaptive Lighting Mode System
# without real Inovelli hardware or Adaptive Lighting integration.
#
# This uses template sensors and manual input helpers to simulate the system.
input_select:
test_room_lighting_mode:
name: "Test Room Lighting Mode"
options:
- "Adaptive"
- "Reading"
- "Sleep"
initial: "Adaptive"
sensor:
- platform: template
sensors:
test_switch_action:
friendly_name: "Test Switch Action"
value_template: "{{ states('input_text.test_switch_action_sim') }}"
input_text:
test_switch_action_sim:
name: "Simulate Switch Action"
initial: "none"
input_number:
test_led_color:
name: "Test LED Color"
min: 0
max: 255
step: 1
initial: 170
# Automation to test mode cycling logic
automation:
- id: test_mode_cycling
alias: "Test: Mode Cycling"
trigger:
- platform: state
entity_id: input_text.test_switch_action_sim
to: "config_single"
variables:
mode_select: input_select.test_room_lighting_mode
current_mode: "{{ states(mode_select) }}"
available_modes: "{{ state_attr(mode_select, 'options') }}"
current_index: "{{ available_modes.index(current_mode) }}"
next_index: "{{ (current_index + 1) % (available_modes | length) }}"
next_mode: "{{ available_modes[next_index] }}"
mode_colors: >-
{{ states('input_text.adaptive_lighting_mode_colors') | from_json }}
next_color: "{{ mode_colors.get(next_mode, 170) }}"
action:
- service: input_select.select_option
target:
entity_id: input_select.test_room_lighting_mode
data:
option: "{{ next_mode }}"
- service: input_number.set_value
target:
entity_id: input_number.test_led_color
data:
value: "{{ next_color }}"

View File

@@ -0,0 +1,322 @@
# Advanced Features Properties
Properties for fan control modes, special operational modes, firmware updates, and advanced configuration via Zigbee2MQTT.
## Fan Control Mode
The switch can be configured to control ceiling fans with multi-tap or cycle modes.
### fanControlMode
- **Type**: Select
- **Values**: "Disabled", "Multi Tap", "Cycle"
- **Default**: "Disabled"
- **Description**: Which mode to use when binding EP3 (config button) to another device (like a fan module). Controls how the switch sends fan speed commands.
- **Home Assistant Entity**: `select.[device_name]_fan_control_mode`
- **Use cases**:
- Control ceiling fan from dimmer switch
- Multi-speed fan control
- Coordinate light + fan control
- **Modes**:
- "Disabled": No fan control
- "Multi Tap": Different tap counts = different speeds
- "Cycle": Each tap cycles through speeds
### lowLevelForFanControlMode
- **Type**: Number
- **Range**: 2-254
- **Default**: 33
- **Description**: Level to send to device bound to EP3 when set to low.
- **Home Assistant Entity**: `number.[device_name]_low_level_for_fan_control_mode`
- **Requires**: fanControlMode != "Disabled"
### mediumLevelForFanControlMode
- **Type**: Number
- **Range**: 2-254
- **Default**: 66
- **Description**: Level to send to device bound to EP3 when set to medium.
- **Home Assistant Entity**: `number.[device_name]_medium_level_for_fan_control_mode`
- **Requires**: fanControlMode != "Disabled"
### highLevelForFanControlMode
- **Type**: Number
- **Range**: 2-254
- **Default**: 100
- **Description**: Level to send to device bound to EP3 when set to high.
- **Home Assistant Entity**: `number.[device_name]_high_level_for_fan_control_mode`
- **Requires**: fanControlMode != "Disabled"
### ledColorForFanControlMode
- **Type**: Number
- **Range**: 0-255
- **Default**: 170 (Blue)
- **Description**: LED color used to display fan control mode.
- **Home Assistant Entity**: `number.[device_name]_led_color_for_fan_control_mode`
- **Preset colors**:
- `0` = Red
- `21` = Orange
- `42` = Yellow
- `85` = Green
- `127` = Cyan
- `170` = Blue
- `212` = Violet
- `234` = Pink
- `255` = White
### fanLedLevelType
- **Type**: Number
- **Range**: 0-10
- **Default**: 0
- **Description**: Level display of the LED Strip for fan control.
- **Home Assistant Entity**: `number.[device_name]_fan_led_level_type`
- **Presets**:
- `0` = Limitless (like VZM31)
- `10` = Adaptive LED
## Single Tap Behavior
### singleTapBehavior
- **Type**: Select
- **Values**: "Old Behavior", "New Behavior", "Down Always Off"
- **Default**: "Old Behavior"
- **Description**: Behavior of single tapping the on or off button.
- **Home Assistant Entity**: `select.[device_name]_single_tap_behavior`
- **Modes**:
- "Old Behavior": Traditional on/off operation
- "New Behavior": Cycles through brightness levels
- "Down Always Off": Up cycles levels, down always turns off
- **Use cases**:
- Customize paddle tap behavior
- Multi-level control without holding
- Quick access to preset levels
## Advanced Configuration
### auxSwitchUniqueScenes
- **Type**: Select
- **Values**: "Disabled", "Enabled"
- **Default**: "Disabled"
- **Description**: Have unique scene numbers for scenes activated with the aux switch.
- **Home Assistant Entity**: `select.[device_name]_aux_switch_unique_scenes`
- **Use cases**:
- Different automations per switch location in 3-way setup
- Location-aware scene triggers
- Advanced multi-point control systems
- **Requires**: switchType = "3-Way Aux Switch"
### bindingOffToOnSyncLevel
- **Type**: Select
- **Values**: "Disabled", "Enabled"
- **Default**: "Disabled"
- **Description**: Send Move_To_Level using Default Level with Off/On to bound devices.
- **Home Assistant Entity**: `select.[device_name]_binding_off_to_on_sync_level`
- **Use cases**:
- Synchronized dimming across Zigbee-bound devices
- Match brightness on associated lights
- Group control coordination
- **Note**: Applies when switch binds to other Zigbee devices
### deviceBindNumber
- **Type**: Sensor (read-only)
- **Description**: The number of devices currently bound (excluding gateways) and counts one group as two devices.
- **Home Assistant Entity**: `sensor.[device_name]_device_bind_number`
- **Read-only**: Cannot be changed, reflects current binding status
- **Use cases**:
- Diagnostic information
- Verify Zigbee binding configuration
- Troubleshoot multi-device coordination
### firmwareUpdateInProgressIndicator
- **Type**: Select
- **Values**: "Disabled", "Enabled"
- **Default**: "Enabled"
- **Description**: Display progress on LED bar during firmware update.
- **Home Assistant Entity**: `select.[device_name]_firmware_update_in_progress_indicator`
- **Use cases**:
- Visual feedback during OTA firmware update
- Indicate update in progress
- Disable for discrete updates
- **Behavior when "Enabled"**:
- LED bar shows update progress
- Progress indication during OTA update
- Provides visual confirmation
### doubleTapClearNotifications
- **Type**: Select
- **Values**: "Enabled (Default)", "Disabled"
- **Default**: "Enabled (Default)"
- **Description**: Double-Tap the Config button to clear notifications.
- **Home Assistant Entity**: `select.[device_name]_double_tap_clear_notifications`
- **Use cases**:
- Quick notification dismissal
- Manual control over persistent LED effects
- User convenience for notification management
## Configuration Patterns
### Fan Control Setup (Multi Tap)
```yaml
service: select.select_option
target:
entity_id: select.bedroom_switch_fan_control_mode
data:
option: "Multi Tap"
# Set fan speed levels
service: number.set_value
target:
entity_id: number.bedroom_switch_low_level_for_fan_control_mode
data:
value: 33 # Low speed
service: number.set_value
target:
entity_id: number.bedroom_switch_medium_level_for_fan_control_mode
data:
value: 66 # Medium speed
service: number.set_value
target:
entity_id: number.bedroom_switch_high_level_for_fan_control_mode
data:
value: 100 # High speed
# Set LED color for fan mode
service: number.set_value
target:
entity_id: number.bedroom_switch_led_color_for_fan_control_mode
data:
value: 85 # Green
```
### Cycling Single Tap Behavior
```yaml
service: select.select_option
target:
entity_id: select.bedroom_switch_single_tap_behavior
data:
option: "New Behavior" # Cycles through levels
```
### Location-Aware 3-Way Scenes
```yaml
service: select.select_option
target:
entity_id: select.bedroom_switch_aux_switch_unique_scenes
data:
option: "Enabled"
# Now bedroom and hallway switches send different scene IDs
# Create separate automations for each location
```
### Synchronized Binding
```yaml
service: select.select_option
target:
entity_id: select.bedroom_switch_binding_off_to_on_sync_level
data:
option: "Enabled" # Bound devices match this switch's level
```
### Visual Firmware Updates
```yaml
service: select.select_option
target:
entity_id: select.bedroom_switch_firmware_update_in_progress_indicator
data:
option: "Enabled" # Show progress on LED bar
```
### Config Button Notification Clear
```yaml
service: select.select_option
target:
entity_id: select.bedroom_switch_double_tap_clear_notifications
data:
option: "Enabled (Default)" # Double-tap config to clear
```
## Fan Control Workflow
### Multi-Tap Mode
With fanControlMode = "Multi Tap":
- Single tap config: Off
- Double tap config: Low speed
- Triple tap config: Medium speed
- Quadruple tap config: High speed
### Cycle Mode
With fanControlMode = "Cycle":
- Each config button tap cycles: Off → Low → Medium → High → Off
### Automation Integration
```yaml
automation:
- alias: "Fan Control via Config Button"
trigger:
- platform: state
entity_id: sensor.bedroom_switch_action
action:
- choose:
- conditions:
- condition: state
entity_id: sensor.bedroom_switch_action
state: "config_double"
sequence:
- service: fan.set_percentage
target:
entity_id: fan.bedroom_fan
data:
percentage: 33 # Low
- conditions:
- condition: state
entity_id: sensor.bedroom_switch_action
state: "config_triple"
sequence:
- service: fan.set_percentage
target:
entity_id: fan.bedroom_fan
data:
percentage: 66 # Medium
- conditions:
- condition: state
entity_id: sensor.bedroom_switch_action
state: "config_quadruple"
sequence:
- service: fan.set_percentage
target:
entity_id: fan.bedroom_fan
data:
percentage: 100 # High
```
## Important Notes
- Fan control modes are designed for Zigbee binding to fan controllers
- Single tap behavior affects all paddle taps (up and down)
- auxSwitchUniqueScenes requires 3-way aux switch configuration
- deviceBindNumber is informational only (read-only)
- firmwareUpdateInProgressIndicator only affects visual feedback, not update function
- LED effects set via led_effect/individual_led_effect can be cleared with config button double-tap
- Fan control LED color helps distinguish between light and fan control modes
- Bindings are managed at the Zigbee level, not via these properties
- Properties exposed via Zigbee2MQTT; Z-Wave-specific features are not applicable

View File

@@ -0,0 +1,236 @@
# Brightness Levels Properties
Properties controlling brightness limits, default levels when turning on, power restore behavior, and multi-tap brightness shortcuts.
## minimumLevel
- **Type**: Number
- **Range**: 1-254
- **Default**: 1 (lowest possible)
- **Description**: The minimum brightness level the switch can dim to. Prevents dimming below a threshold where lights flicker or turn off.
- **Home Assistant Entity**: `number.[device_name]_minimum_level`
- **Use cases**:
- Prevent LED bulb flickering at low levels
- Set nightlight minimum brightness
- Ensure lights never go completely dark when dimming
- **Common values**:
- LED bulbs: 10-20 (prevents flickering)
- Incandescent: 1-5 (can dim lower)
- Smart bulbs: 1 (handle dimming internally)
## maximumLevel
- **Type**: Number
- **Range**: 2-255
- **Default**: 255 (full brightness)
- **Description**: The maximum brightness level the switch can reach. Limits top-end brightness.
- **Home Assistant Entity**: `number.[device_name]_maximum_level`
- **Use cases**:
- Limit max brightness to extend bulb life
- Reduce energy consumption
- Create softer ambient lighting maximum
- Protect sensitive loads
- **Common values**:
- Full brightness: 255
- Energy saving: 200-230
- Ambient lighting: 150-180
## invertSwitch
- **Type**: Select
- **Values**: "Yes", "No"
- **Default**: "No" (normal orientation)
- **Description**: Inverts paddle operation (up becomes down, down becomes up).
- **Home Assistant Entity**: `select.[device_name]_invert_switch`
- **Use cases**:
- Match 3-way switch orientation
- Accommodate non-standard wiring
- User preference for reversed operation
## defaultLevelLocal
- **Type**: Number
- **Range**: 0-255
- **Default**: 255 (last level or max)
- **Description**: Brightness level when turned on via physical paddle.
- **Home Assistant Entity**: `number.[device_name]_default_level_local`
- **Special values**:
- `0-254` = Specific brightness level
- `255` = Return to the level that it was on before it was turned off (smart resume)
- **Use cases**:
- Always turn on to comfortable level (e.g., 128 for 50%)
- Predictable brightness for specific room uses
- Override smart resume for consistent behavior
## defaultLevelRemote
- **Type**: Number
- **Range**: 0-255
- **Default**: 255 (last level or max)
- **Description**: Brightness level when turned on via hub commands (automations/app).
- **Home Assistant Entity**: `number.[device_name]_default_level_remote`
- **Special values**:
- `0-254` = Specific brightness level
- `255` = Return to the level that it was on before it was turned off (smart resume)
- **Use cases**:
- Automations that need predictable brightness
- Different default for voice/app control vs physical
- Scene activation with specific levels
## stateAfterPowerRestored
- **Type**: Number
- **Range**: 0-255
- **Default**: 255 (previous state)
- **Description**: The state the switch should return to when power is restored after power failure.
- **Home Assistant Entity**: `number.[device_name]_state_after_power_restored`
- **Special values**:
- `0` = off
- `1-254` = Specific brightness level (and turn on)
- `255` = Return to previous state before power loss
- **Use cases**:
- Always off after power restore (set to 0)
- Emergency lighting (set to specific brightness)
- Smart restore to previous state (set to 255)
## brightnessLevelForDoubleTapUp
- **Type**: Number
- **Range**: 2-255
- **Default**: 254 (near maximum)
- **Description**: Set this level on double-tap UP (if enabled by doubleTapUpToParam55).
- **Home Assistant Entity**: `number.[device_name]_brightness_level_for_double_tap_up`
- **Special values**:
- `2-254` = Specific brightness level
- `255` = Send ON command
- **Use cases**:
- Quick full-bright shortcut
- Task lighting preset
- Scene activation brightness
- **Prerequisites**: Requires doubleTapUpToParam55 = "Enabled"
## brightnessLevelForDoubleTapDown
- **Type**: Number
- **Range**: 0-255
- **Default**: 0
- **Description**: Set this level on double-tap DOWN (if enabled by doubleTapDownToParam56).
- **Home Assistant Entity**: `number.[device_name]_brightness_level_for_double_tap_down`
- **Special values**:
- `0` = Send OFF command
- `1-254` = Specific brightness level
- `255` = Send OFF command
- **Use cases**:
- Quick nightlight mode
- Turn off shortcut
- Low-light scene activation
- **Prerequisites**: Requires doubleTapDownToParam56 = "Enabled"
## Configuration Patterns
### Smart Resume (Memory)
All settings return to previous state/level:
```yaml
service: number.set_value
target:
entity_id:
- number.bedroom_switch_default_level_local
- number.bedroom_switch_default_level_remote
- number.bedroom_switch_state_after_power_restored
data:
value: 255 # Remember previous level
```
### Predictable Lighting
Always turn on to 50% brightness:
```yaml
service: number.set_value
target:
entity_id:
- number.bedroom_switch_default_level_local
- number.bedroom_switch_default_level_remote
- number.bedroom_switch_state_after_power_restored
data:
value: 128 # 50% brightness
```
### LED Bulb Optimization
Prevent low-level flicker with memory:
```yaml
# Prevent flicker
service: number.set_value
target:
entity_id: number.bedroom_switch_minimum_level
data:
value: 15
# Full range at top
service: number.set_value
target:
entity_id: number.bedroom_switch_maximum_level
data:
value: 255
# Smart resume
service: number.set_value
target:
entity_id:
- number.bedroom_switch_default_level_local
- number.bedroom_switch_default_level_remote
data:
value: 255
```
### Task + Ambient Presets
Three brightness presets via paddle control:
```yaml
# Comfortable ambient for single press
service: number.set_value
target:
entity_id: number.bedroom_switch_default_level_local
data:
value: 180
# Full bright for tasks (double-tap up)
service: number.set_value
target:
entity_id: number.bedroom_switch_brightness_level_for_double_tap_up
data:
value: 254
# Enable double-tap up
service: select.select_option
target:
entity_id: select.bedroom_switch_double_tap_up_to_param55
data:
option: "Enabled"
# Nightlight mode (double-tap down)
service: number.set_value
target:
entity_id: number.bedroom_switch_brightness_level_for_double_tap_down
data:
value: 30
# Enable double-tap down
service: select.select_option
target:
entity_id: select.bedroom_switch_double_tap_down_to_param56
data:
option: "Enabled"
```
### Inverted Switch
For upside-down installation:
```yaml
service: select.select_option
target:
entity_id: select.bedroom_switch_invert_switch
data:
option: "Yes"
```

View File

@@ -0,0 +1,219 @@
# Dimming & Ramp Control Properties
Properties controlling how the switch dims lights and transitions between brightness levels. Each property has separate settings for "Remote" (commands from Home Assistant hub/automations) and "Local" (physical paddle presses).
## dimmingSpeedUpRemote
- **Type**: Number
- **Range**: 0-127
- **Default**: 25
- **Unit**: 100ms increments (e.g., 25 = 2.5 seconds)
- **Description**: Changes the speed that the light dims up when controlled from the hub. A setting of 0 turns the light immediately to the target level. Increasing the value slows down the transition speed.
- **Home Assistant Entity**: `number.[device_name]_dimming_speed_up_remote`
- **Special values**:
- `0` = Instant dimming (no transition)
- `1-127` = Duration in 100ms increments
- **Use cases**: Smooth transitions for automations, gradual wake-up lighting
## dimmingSpeedUpLocal
- **Type**: Number
- **Range**: 0-127
- **Default**: 127 (sync with dimmingSpeedUpRemote)
- **Unit**: 100ms increments
- **Description**: Changes the speed that the light dims up when controlled at the switch. A setting of 0 turns the light immediately to the target level. Setting to 127 keeps it in sync with dimmingSpeedUpRemote.
- **Home Assistant Entity**: `number.[device_name]_dimming_speed_up_local`
- **Special values**:
- `0` = Instant dimming
- `1-126` = Duration in 100ms increments
- `127` = Sync with dimmingSpeedUpRemote
- **Use cases**: Customize local dimming to be faster or slower than remote control
## rampRateOffToOnRemote
- **Type**: Number
- **Range**: 0-127
- **Default**: 127 (sync with dimmingSpeedUpRemote)
- **Unit**: 100ms increments
- **Description**: Changes the speed that the light turns on when controlled from the hub. A setting of 0 turns the light immediately on.
- **Home Assistant Entity**: `number.[device_name]_ramp_rate_off_to_on_remote`
- **Special values**:
- `0` = Instant on
- `1-126` = Duration in 100ms increments
- `127` = Sync with dimmingSpeedUpRemote
- **Use cases**: Gentle wake-up lighting, dramatic scene transitions
## rampRateOffToOnLocal
- **Type**: Number
- **Range**: 0-127
- **Default**: 127 (sync with dimmingSpeedUpRemote)
- **Unit**: 100ms increments
- **Description**: Changes the speed that the light turns on when controlled at the switch. A setting of 0 turns the light immediately on.
- **Home Assistant Entity**: `number.[device_name]_ramp_rate_off_to_on_local`
- **Special values**:
- `0` = Instant on
- `1-126` = Duration in 100ms increments
- `127` = Sync with dimmingSpeedUpRemote
- **Use cases**: Different on-ramp behavior for manual vs automated control
## dimmingSpeedDownRemote
- **Type**: Number
- **Range**: 0-127
- **Default**: 127 (sync with dimmingSpeedUpRemote)
- **Unit**: 100ms increments
- **Description**: Changes the speed that the light dims down when controlled from the hub. A setting of 0 turns the light immediately to the target level.
- **Home Assistant Entity**: `number.[device_name]_dimming_speed_down_remote`
- **Special values**:
- `0` = Instant dimming
- `1-126` = Duration in 100ms increments
- `127` = Sync with dimmingSpeedUpRemote
- **Use cases**: Asymmetric dimming (e.g., fast up, slow down for sunset effect)
## dimmingSpeedDownLocal
- **Type**: Number
- **Range**: 0-127
- **Default**: 127 (sync with dimmingSpeedUpLocal)
- **Unit**: 100ms increments
- **Description**: Changes the speed that the light dims down when controlled at the switch. A setting of 0 turns the light immediately to the target level.
- **Home Assistant Entity**: `number.[device_name]_dimming_speed_down_local`
- **Special values**:
- `0` = Instant dimming
- `1-126` = Duration in 100ms increments
- `127` = Sync with dimmingSpeedUpLocal
- **Use cases**: Match or differentiate from remote down-dimming behavior
## rampRateOnToOffRemote
- **Type**: Number
- **Range**: 0-127
- **Default**: 127 (sync with rampRateOffToOnRemote)
- **Unit**: 100ms increments
- **Description**: Changes the speed that the light turns off when controlled from the hub. A setting of 0 (instant) turns the light immediately off.
- **Home Assistant Entity**: `number.[device_name]_ramp_rate_on_to_off_remote`
- **Special values**:
- `0` = Instant off
- `1-126` = Duration in 100ms increments
- `127` = Sync with rampRateOffToOnRemote
- **Use cases**: Gradual fade to black, bedtime dimming routines
## rampRateOnToOffLocal
- **Type**: Number
- **Range**: 0-127
- **Default**: 127 (sync with rampRateOffToOnLocal)
- **Unit**: 100ms increments
- **Description**: Changes the speed that the light turns off when controlled at the switch. A setting of 0 (instant) turns the light immediately off.
- **Home Assistant Entity**: `number.[device_name]_ramp_rate_on_to_off_local`
- **Special values**:
- `0` = Instant off
- `1-126` = Duration in 100ms increments
- `127` = Sync with rampRateOffToOnLocal
- **Use cases**: Theater-style fade out, energy-saving gradual shutoff
## Configuration Patterns
### Synchronized Dimming
Set all local parameters to `127` to use the remote parameters as the master speed control for all dimming operations.
```yaml
# All in sync with dimmingSpeedUpRemote
service: number.set_value
target:
entity_id: number.bedroom_switch_dimming_speed_up_remote
data:
value: 25 # 2.5 seconds
# Set all local to sync
service: number.set_value
target:
entity_id:
- number.bedroom_switch_dimming_speed_up_local
- number.bedroom_switch_ramp_rate_off_to_on_local
- number.bedroom_switch_dimming_speed_down_local
- number.bedroom_switch_ramp_rate_on_to_off_local
data:
value: 127 # Sync with remote
```
### Instant Local, Smooth Remote
- Local: `0` (instant control)
- Remote: `50` (5-second smooth transitions)
```yaml
# Set remote for smooth transitions
service: number.set_value
target:
entity_id:
- number.bedroom_switch_dimming_speed_up_remote
- number.bedroom_switch_ramp_rate_off_to_on_remote
- number.bedroom_switch_dimming_speed_down_remote
- number.bedroom_switch_ramp_rate_on_to_off_remote
data:
value: 50
# Set local for instant response
service: number.set_value
target:
entity_id:
- number.bedroom_switch_dimming_speed_up_local
- number.bedroom_switch_ramp_rate_off_to_on_local
- number.bedroom_switch_dimming_speed_down_local
- number.bedroom_switch_ramp_rate_on_to_off_local
data:
value: 0
```
### Asymmetric Dimming
- Dim up quickly: `10` (1 second)
- Dim down slowly: `100` (10 seconds)
- Creates dynamic lighting feel
```yaml
# Quick dim up
service: number.set_value
target:
entity_id:
- number.bedroom_switch_dimming_speed_up_remote
- number.bedroom_switch_dimming_speed_up_local
data:
value: 10
# Slow dim down
service: number.set_value
target:
entity_id:
- number.bedroom_switch_dimming_speed_down_remote
- number.bedroom_switch_dimming_speed_down_local
data:
value: 100
```
### Scene-Based Transitions
- Off→On ramp: `30` (3 seconds - gentle fade in)
- On→Off ramp: `100` (10 seconds - slow fade out)
- Dimming speed: `20` (2 seconds - responsive)
```yaml
service: number.set_value
target:
entity_id: number.bedroom_switch_ramp_rate_off_to_on_remote
data:
value: 30
service: number.set_value
target:
entity_id: number.bedroom_switch_ramp_rate_on_to_off_remote
data:
value: 100
service: number.set_value
target:
entity_id:
- number.bedroom_switch_dimming_speed_up_remote
- number.bedroom_switch_dimming_speed_down_remote
data:
value: 20
```

View File

@@ -0,0 +1,428 @@
# LED Configuration Properties
Properties controlling the LED strip on the switch, including colors, intensity levels, animated effects, and display modes. The switch has 7 individual LEDs plus global defaults.
## LED Effects
### led_effect
Composite property to control LED effects for the entire LED bar.
- **Type**: Composite (requires MQTT publish)
- **Description**: Controls animation effects for all LEDs on the bar
- **Access**: Set via MQTT publish to `zigbee2mqtt/[device_name]/set`
- **Properties**:
- `effect`: Animation effect type
- `color`: Color value (0-255, hue-based)
- `level`: Brightness (0-100%)
- `duration`: How long the effect lasts
- **Effect values**:
- `off` - Turn off LED effect
- `solid` - Solid color
- `fast_blink` - Fast blinking
- `slow_blink` - Slow blinking
- `pulse` - Pulsing effect
- `chase` - Chase/running pattern
- `open_close` - Open/close animation
- `small_to_big` - Small to big animation
- `aurora` - Aurora effect
- `slow_falling` - Slow falling effect
- `medium_falling` - Medium falling effect
- `fast_falling` - Fast falling effect
- `slow_rising` - Slow rising effect
- `medium_rising` - Medium rising effect
- `fast_rising` - Fast rising effect
- `medium_blink` - Medium blink
- `slow_chase` - Slow chase
- `fast_chase` - Fast chase
- `fast_siren` - Fast siren
- `slow_siren` - Slow siren
- `clear_effect` - Clear/stop current effect
- **Duration encoding**:
- `1-60` = Seconds
- `61-120` = Minutes (value - 60)
- `121-254` = Hours (value - 120)
- `255` = Indefinitely
**Example usage:**
```yaml
service: mqtt.publish
data:
topic: zigbee2mqtt/bedroom_switch/set
payload: '{"led_effect": {"effect": "pulse", "color": 170, "level": 100, "duration": 255}}'
```
### individual_led_effect
Composite property to control effects for a single LED.
- **Type**: Composite (requires MQTT publish)
- **Description**: Controls animation effects for one specific LED
- **Access**: Set via MQTT publish to `zigbee2mqtt/[device_name]/set`
- **Properties**:
- `led`: LED number (1-7, 1=bottom, 7=top)
- `effect`: Animation effect type
- `color`: Color value (0-255)
- `level`: Brightness (0-100%)
- `duration`: How long the effect lasts
- **LED numbering**: 1 (bottom) through 7 (top)
- **Effect values**:
- `off` - Turn off LED effect
- `solid` - Solid color
- `fast_blink` - Fast blinking
- `slow_blink` - Slow blinking
- `pulse` - Pulsing effect
- `chase` - Chase pattern
- `falling` - Falling effect
- `rising` - Rising effect
- `aurora` - Aurora effect
- `clear_effect` - Clear/stop effect
- **Duration encoding**: Same as led_effect
**Example usage:**
```yaml
service: mqtt.publish
data:
topic: zigbee2mqtt/bedroom_switch/set
payload: '{"individual_led_effect": {"led": "4", "effect": "fast_blink", "color": 0, "level": 100, "duration": 30}}'
```
## Global LED Properties
### ledColorWhenOn
- **Type**: Number
- **Range**: 0-255
- **Default**: 170 (Blue)
- **Description**: Default LED strip color when switch is on. Applies to all LEDs unless individually configured.
- **Home Assistant Entity**: `number.[device_name]_led_color_when_on`
- **Color wheel mapping**: 0-255 representing hue (0-360° mapped to 0-255)
- **Preset colors**:
- `0` = Red
- `21` = Orange
- `42` = Yellow
- `85` = Green
- `127` = Cyan
- `170` = Blue
- `212` = Violet
- `234` = Pink
- `255` = White
### ledColorWhenOff
- **Type**: Number
- **Range**: 0-255
- **Default**: 170 (Blue)
- **Description**: Default LED strip color when switch is off.
- **Home Assistant Entity**: `number.[device_name]_led_color_when_off`
- **Preset colors**: Same as ledColorWhenOn
### ledIntensityWhenOn
- **Type**: Number
- **Range**: 0-100
- **Default**: 33 (33%)
- **Description**: Default LED strip brightness when switch is on.
- **Home Assistant Entity**: `number.[device_name]_led_intensity_when_on`
- **Special values**:
- `0` = LEDs off (no indicator when on)
- `1-100` = Brightness percentage
- **Common values**:
- Night mode: `5-10`
- Default: `33`
- Maximum visibility: `100`
### ledIntensityWhenOff
- **Type**: Number
- **Range**: 0-100
- **Default**: 1 (1%)
- **Description**: Default LED strip brightness when switch is off.
- **Home Assistant Entity**: `number.[device_name]_led_intensity_when_off`
- **Common values**:
- Nightlight: `1-5`
- Locator: `10-20`
- Off (stealth): `0`
## Individual LED Properties
Each of the 7 LEDs can be individually configured with color and intensity for both on and off states. LED #1 is the bottom, LED #7 is the top.
### LED #1 (Bottom)
- **Color When On**: `number.[device_name]_default_led1_color_when_on` (0-255, 255=sync with global)
- **Color When Off**: `number.[device_name]_default_led1_color_when_off` (0-255, 255=sync with global)
- **Intensity When On**: `number.[device_name]_default_led1_intensity_when_on` (0-101, 101=sync)
- **Intensity When Off**: `number.[device_name]_default_led1_intensity_when_off` (0-101, 101=sync)
### LED #2
- **Color When On**: `number.[device_name]_default_led2_color_when_on`
- **Color When Off**: `number.[device_name]_default_led2_color_when_off`
- **Intensity When On**: `number.[device_name]_default_led2_intensity_when_on`
- **Intensity When Off**: `number.[device_name]_default_led2_intensity_when_off`
### LED #3
- **Color When On**: `number.[device_name]_default_led3_color_when_on`
- **Color When Off**: `number.[device_name]_default_led3_color_when_off`
- **Intensity When On**: `number.[device_name]_default_led3_intensity_when_on`
- **Intensity When Off**: `number.[device_name]_default_led3_intensity_when_off`
### LED #4 (Middle)
- **Color When On**: `number.[device_name]_default_led4_color_when_on`
- **Color When Off**: `number.[device_name]_default_led4_color_when_off`
- **Intensity When On**: `number.[device_name]_default_led4_intensity_when_on`
- **Intensity When Off**: `number.[device_name]_default_led4_intensity_when_off`
### LED #5
- **Color When On**: `number.[device_name]_default_led5_color_when_on`
- **Color When Off**: `number.[device_name]_default_led5_color_when_off`
- **Intensity When On**: `number.[device_name]_default_led5_intensity_when_on`
- **Intensity When Off**: `number.[device_name]_default_led5_intensity_when_off`
### LED #6
- **Color When On**: `number.[device_name]_default_led6_color_when_on`
- **Color When Off**: `number.[device_name]_default_led6_color_when_off`
- **Intensity When On**: `number.[device_name]_default_led6_intensity_when_on`
- **Intensity When Off**: `number.[device_name]_default_led6_intensity_when_off`
### LED #7 (Top)
- **Color When On**: `number.[device_name]_default_led7_color_when_on`
- **Color When Off**: `number.[device_name]_default_led7_color_when_off`
- **Intensity When On**: `number.[device_name]_default_led7_intensity_when_on`
- **Intensity When Off**: `number.[device_name]_default_led7_intensity_when_off`
**Note**: Individual LED color set to `255` or intensity set to `101` means "follow global default"
## LED Display Modes
### ledBarScaling
- **Type**: Select
- **Values**: "Gen3 method (VZM-style)", "Gen2 method (LZW-style)"
- **Default**: "Gen3 method (VZM-style)"
- **Description**: Controls how LED bar represents dimmer level.
- **Home Assistant Entity**: `select.[device_name]_led_bar_scaling`
- **Use cases**: Match behavior of older Inovelli switches for consistency
### onOffLedMode
- **Type**: Select
- **Values**: "All", "One"
- **Default**: "All"
- **Description**: When in On/Off mode, use full LED bar or just one LED.
- **Home Assistant Entity**: `select.[device_name]_on_off_led_mode`
- **Use cases**:
- Match Gen 2 Red/Black series appearance
- Preference for single LED indicator
- Reduce LED brightness/distraction
## Configuration Patterns
### Standard Blue Indicator
```yaml
service: number.set_value
target:
entity_id: number.bedroom_switch_led_color_when_on
data:
value: 170 # Blue
service: number.set_value
target:
entity_id: number.bedroom_switch_led_color_when_off
data:
value: 170 # Blue
service: number.set_value
target:
entity_id: number.bedroom_switch_led_intensity_when_on
data:
value: 33
service: number.set_value
target:
entity_id: number.bedroom_switch_led_intensity_when_off
data:
value: 1
```
### Green On / Red Off
```yaml
service: number.set_value
target:
entity_id: number.bedroom_switch_led_color_when_on
data:
value: 85 # Green
service: number.set_value
target:
entity_id: number.bedroom_switch_led_color_when_off
data:
value: 0 # Red
service: number.set_value
target:
entity_id:
- number.bedroom_switch_led_intensity_when_on
- number.bedroom_switch_led_intensity_when_off
data:
value: 40
```
### Stealth Mode
```yaml
service: number.set_value
target:
entity_id:
- number.bedroom_switch_led_intensity_when_on
- number.bedroom_switch_led_intensity_when_off
data:
value: 0
```
### Nightlight Mode
```yaml
# Soft pink when off, dark when on
service: number.set_value
target:
entity_id: number.bedroom_switch_led_color_when_off
data:
value: 234 # Pink
service: number.set_value
target:
entity_id: number.bedroom_switch_led_intensity_when_off
data:
value: 5
service: number.set_value
target:
entity_id: number.bedroom_switch_led_intensity_when_on
data:
value: 0
```
### Rainbow Bar (Individual LEDs)
```yaml
# Set each LED to a different color
service: number.set_value
target:
entity_id:
- number.bedroom_switch_default_led1_color_when_on
data:
value: 0 # Red
service: number.set_value
target:
entity_id: number.bedroom_switch_default_led2_color_when_on
data:
value: 42 # Yellow
service: number.set_value
target:
entity_id: number.bedroom_switch_default_led3_color_when_on
data:
value: 85 # Green
service: number.set_value
target:
entity_id: number.bedroom_switch_default_led4_color_when_on
data:
value: 127 # Cyan
service: number.set_value
target:
entity_id: number.bedroom_switch_default_led5_color_when_on
data:
value: 170 # Blue
service: number.set_value
target:
entity_id: number.bedroom_switch_default_led6_color_when_on
data:
value: 212 # Violet
service: number.set_value
target:
entity_id: number.bedroom_switch_default_led7_color_when_on
data:
value: 234 # Pink
```
### Notification Alert (Pulse Red)
```yaml
# 30 second red pulse on all LEDs
service: mqtt.publish
data:
topic: zigbee2mqtt/bedroom_switch/set
payload: '{"led_effect": {"effect": "pulse", "color": 0, "level": 100, "duration": 30}}'
```
### Status Indicator (Middle LED Blink)
```yaml
# Blink middle LED (LED 4) blue for 1 minute
service: mqtt.publish
data:
topic: zigbee2mqtt/bedroom_switch/set
payload: '{"individual_led_effect": {"led": "4", "effect": "fast_blink", "color": 170, "level": 100, "duration": 60}}'
```
### Doorbell Notification (Fast Chase)
```yaml
# Fast chase effect in cyan for 10 seconds
service: mqtt.publish
data:
topic: zigbee2mqtt/bedroom_switch/set
payload: '{"led_effect": {"effect": "fast_chase", "color": 127, "level": 100, "duration": 10}}'
```
### Clear All Effects
```yaml
service: mqtt.publish
data:
topic: zigbee2mqtt/bedroom_switch/set
payload: '{"led_effect": {"effect": "clear_effect"}}'
```
## LED Color Palette
Quick reference for common colors (hue-based, 0-255):
- `0` - Red
- `21` - Orange
- `42` - Yellow
- `64` - Yellow-Green
- `85` - Green
- `106` - Cyan-Green
- `127` - Cyan
- `148` - Blue-Cyan
- `170` - Blue (default)
- `191` - Blue-Violet
- `212` - Violet
- `223` - Magenta
- `234` - Pink
- `244` - Pink-Red
- `255` - White
## Notes
- Individual LED properties override global defaults
- Setting individual LED color to `255` makes it follow global color
- Setting individual LED intensity to `101` makes it follow global intensity
- LED effects from `led_effect` and `individual_led_effect` are temporary
- Effects automatically clear after duration expires or when `clear_effect` is sent
- Property changes take effect immediately without requiring switch reboot
- Use MQTT publish for LED effects; they cannot be set via Home Assistant number/select entities

View File

@@ -0,0 +1,364 @@
# Power & Energy Monitoring Properties
Properties for power consumption measurement, energy usage tracking, and reporting thresholds via Zigbee2MQTT.
## Sensor Properties (Read-Only)
### power
- **Type**: Sensor (read-only)
- **Unit**: Watts (W)
- **Description**: Instantaneous measured power consumption of the connected load.
- **Home Assistant Entity**: `sensor.[device_name]_power`
- **Updates**: Based on activePowerReports threshold or periodicPowerAndEnergyReports interval
- **Use cases**:
- Real-time power monitoring
- Detect when lights turn on/off
- Track power consumption changes
- Trigger automations based on power usage
### energy
- **Type**: Sensor (read-only)
- **Unit**: Kilowatt-hours (kWh)
- **Description**: Cumulative energy consumption over time.
- **Home Assistant Entity**: `sensor.[device_name]_energy`
- **Updates**: Based on activeEnergyReports threshold or periodicPowerAndEnergyReports interval
- **Use cases**:
- Long-term energy tracking
- Billing/cost calculations
- Energy usage analytics
- Historical consumption trends
## Reporting Configuration
### activePowerReports
- **Type**: Number
- **Range**: 0-100
- **Default**: 10 (10% change)
- **Description**: Percent power level change that will result in a new power report being sent. 0 = Disabled.
- **Home Assistant Entity**: `number.[device_name]_active_power_reports`
- **Special values**:
- `0` = Disabled (no automatic power reports based on change)
- `1-100` = Percentage change threshold
- **Use cases**:
- Real-time power monitoring
- Detect significant power changes
- Trigger automations based on power delta
- **Common values**:
- Sensitive monitoring: `5` (5% change)
- Default: `10` (10% change)
- Reduce network traffic: `20` (20% change)
- **Network impact**: Lower values generate more Zigbee traffic
### periodicPowerAndEnergyReports
- **Type**: Number
- **Range**: 0-32767
- **Default**: 3600 seconds (1 hour)
- **Description**: Time period between consecutive power & energy reports being sent (in seconds). The timer is reset after each report is sent.
- **Home Assistant Entity**: `number.[device_name]_periodic_power_and_energy_reports`
- **Units**: Seconds
- **Special values**:
- `0` = Disabled (no periodic reports)
- `1-32767` = Report interval in seconds
- **Use cases**:
- Regular energy usage logging
- Dashboard updates
- Long-term consumption tracking
- Backup reporting if active reports miss changes
- **Common values**:
- Frequent updates: `300` (5 minutes)
- Default: `3600` (1 hour)
- Reduce traffic: `7200` (2 hours)
- Daily: `86400` (24 hours)
- **Note**: Works alongside activePowerReports and activeEnergyReports (not instead of)
### activeEnergyReports
- **Type**: Number
- **Range**: 0-32767
- **Default**: 10 (0.10 kWh)
- **Description**: Energy level change which will result in sending a new energy report. 0 = disabled, 1-32767 = 0.01kWh-327.67kWh.
- **Home Assistant Entity**: `number.[device_name]_active_energy_reports`
- **Units**: 0.01 kWh (value of 10 = 0.10 kWh = 100 Wh)
- **Special values**:
- `0` = Disabled (no automatic energy reports based on accumulation)
- `1-32767` = Threshold in 0.01 kWh increments
- **Use cases**:
- Track cumulative energy consumption
- Billing/cost calculations
- Energy usage analytics
- Trigger automations at energy milestones
- **Common values**:
- Sensitive: `1` (0.01 kWh = 10 Wh)
- Default: `10` (0.10 kWh = 100 Wh)
- Reduce traffic: `100` (1.0 kWh)
- **Example**: Default of 10 means report every 100 Wh (0.1 kWh) consumed
## Performance Tuning
### quickStartTime
- **Type**: Number
- **Range**: 0-60
- **Default**: 0 (disabled)
- **Description**: Duration of full power output while lamp transitions from Off to On. In 60th of second. 0 = disable, 1 = 1/60s, 60 = 1s.
- **Home Assistant Entity**: `number.[device_name]_quick_start_time`
- **Units**: 1/60th of a second
- **Use cases**:
- Help LED bulbs start reliably
- Overcome LED driver inrush requirements
- Prevent flickering on startup
- **Common values**:
- Disabled: `0`
- Short boost: `10` (0.17 seconds)
- Default boost: `20` (0.33 seconds)
- Long boost: `60` (1 second)
### quickStartLevel
- **Type**: Number
- **Range**: 1-254
- **Default**: 254 (near full power)
- **Description**: Level of power output during Quick Start Light time (quickStartTime).
- **Home Assistant Entity**: `number.[device_name]_quick_start_level`
- **Use cases**:
- Ensure LED bulbs receive enough initial power to start
- Match bulb requirements for startup
- **Requires**: quickStartTime > 0
### higherOutputInNonNeutral
- **Type**: Select
- **Values**: "Disabled (default)", "Enabled"
- **Default**: "Disabled (default)"
- **Description**: Increase output level in non-neutral mode to help bulbs start and operate properly.
- **Home Assistant Entity**: `select.[device_name]_higher_output_in_non_neutral`
- **Use cases**:
- Non-neutral installations with LED bulbs
- Improve dimming range in non-neutral mode
- Help bulbs work better without neutral wire
- **Note**: Only applies to non-neutral wiring configurations
## Power Type Detection
### powerType
- **Type**: Sensor (read-only)
- **Values**: "Non Neutral", "Neutral"
- **Description**: Detected power wiring type.
- **Home Assistant Entity**: `sensor.[device_name]_power_type`
- **Read-only**: Cannot be changed by user, automatically detected
- **Use cases**:
- Diagnostic information
- Verify wiring configuration
- Troubleshooting installation issues
- **Note**: Automatically detected by switch hardware
## Configuration Patterns
### Real-Time Power Monitoring
```yaml
# Sensitive power change detection
service: number.set_value
target:
entity_id: number.bedroom_switch_active_power_reports
data:
value: 5 # Report on 5% power change
# Frequent periodic backup
service: number.set_value
target:
entity_id: number.bedroom_switch_periodic_power_and_energy_reports
data:
value: 300 # Every 5 minutes
# Disable energy threshold reports (focus on power)
service: number.set_value
target:
entity_id: number.bedroom_switch_active_energy_reports
data:
value: 0 # Disabled
```
### Energy Usage Tracking
```yaml
# Less sensitive power reports
service: number.set_value
target:
entity_id: number.bedroom_switch_active_power_reports
data:
value: 20 # Report on 20% change
# Hourly periodic reports
service: number.set_value
target:
entity_id: number.bedroom_switch_periodic_power_and_energy_reports
data:
value: 3600 # Every hour
# Energy threshold reporting
service: number.set_value
target:
entity_id: number.bedroom_switch_active_energy_reports
data:
value: 10 # Report every 0.1 kWh
```
### Low Network Traffic
```yaml
# High power change threshold
service: number.set_value
target:
entity_id: number.bedroom_switch_active_power_reports
data:
value: 25 # 25% change
# 2-hour periodic reports
service: number.set_value
target:
entity_id: number.bedroom_switch_periodic_power_and_energy_reports
data:
value: 7200
# High energy threshold
service: number.set_value
target:
entity_id: number.bedroom_switch_active_energy_reports
data:
value: 100 # Every 1 kWh
```
### LED Bulb Quick Start
```yaml
# Enable quick start with 1/3 second boost
service: number.set_value
target:
entity_id: number.bedroom_switch_quick_start_time
data:
value: 20 # 20/60 = 0.33 seconds
# Full power during quick start
service: number.set_value
target:
entity_id: number.bedroom_switch_quick_start_level
data:
value: 254 # Near maximum
```
### Non-Neutral Optimization
```yaml
# Enable higher output for non-neutral
service: select.select_option
target:
entity_id: select.bedroom_switch_higher_output_in_non_neutral
data:
option: "Enabled"
# May also need quick start
service: number.set_value
target:
entity_id: number.bedroom_switch_quick_start_time
data:
value: 30 # 0.5 seconds
```
### Disable All Monitoring
```yaml
# Turn off all automatic reporting
service: number.set_value
target:
entity_id:
- number.bedroom_switch_active_power_reports
- number.bedroom_switch_periodic_power_and_energy_reports
- number.bedroom_switch_active_energy_reports
data:
value: 0
```
## Reporting Behavior
The switch can send reports via three independent mechanisms:
1. **Active Power Reports**: Sent when power changes by threshold percentage
2. **Active Energy Reports**: Sent when accumulated energy reaches threshold
3. **Periodic Reports**: Sent at regular time intervals
All three work independently and can be used together for comprehensive monitoring.
## Home Assistant Integration Example
### Power-Based Automation
```yaml
automation:
- alias: "Detect Light On"
trigger:
- platform: numeric_state
entity_id: sensor.bedroom_switch_power
above: 5 # 5W threshold
action:
- service: notify.mobile_app
data:
message: "Bedroom light turned on ({{ states('sensor.bedroom_switch_power') }}W)"
- alias: "Detect Light Off"
trigger:
- platform: numeric_state
entity_id: sensor.bedroom_switch_power
below: 1 # Less than 1W
for:
seconds: 5
action:
- service: notify.mobile_app
data:
message: "Bedroom light turned off"
```
### Energy Cost Tracking
```yaml
automation:
- alias: "Daily Energy Report"
trigger:
- platform: time
at: "23:59:00"
action:
- service: notify.mobile_app
data:
message: >
Bedroom light energy today: {{ states('sensor.bedroom_switch_energy') }} kWh
Estimated cost: ${{ (states('sensor.bedroom_switch_energy') | float * 0.12) | round(2) }}
```
## Example Calculations
### Power Threshold
activePowerReports = `20` → Report when power changes by 20%
- Load at 40W, dims to 35W: Change is 12.5%, no report
- Load at 40W, dims to 30W: Change is 25%, report sent
### Energy Threshold
activeEnergyReports = `50` → Report every 0.5 kWh (500 Wh)
- 100W bulb for 5 hours: 500 Wh consumed → Report sent
### Periodic Reporting
periodicPowerAndEnergyReports = `1800` → Report every 30 minutes
- Regardless of power/energy changes, status sent every 30min
## Important Notes
- All reporting properties work independently
- Power and energy sensors update based on configured thresholds
- quickStartTime/Level only applies to the transition from off to on
- higherOutputInNonNeutral only helps in non-neutral wiring setups
- Sensors are read-only; only configuration properties can be set
- Lower reporting thresholds increase Zigbee network traffic
- Power readings may have ~1W accuracy tolerance

View File

@@ -0,0 +1,213 @@
# Protection & Safety Properties
Properties for device protection, temperature monitoring, access control, and overheat safety features via Zigbee2MQTT.
## Temperature Monitoring (Read-Only)
### internalTemperature
- **Type**: Sensor (read-only)
- **Range**: 0-127°C
- **Unit**: Degrees Celsius (°C)
- **Description**: The temperature measured by the temperature sensor inside the chip, in degrees Celsius.
- **Home Assistant Entity**: `sensor.[device_name]_internal_temperature`
- **Read-only**: Cannot be changed by user, reports actual temperature
- **Use cases**:
- Monitor switch health
- Detect overheating conditions
- Trigger cooling automations
- Diagnostic information
- **Normal range**: Typically 30-50°C during operation
- **Warning signs**:
- Above 60°C: High temperature, check ventilation
- Above 70°C: Overheat protection may activate
### overheat
- **Type**: Sensor (read-only)
- **Values**: "No Alert", "Overheated"
- **Description**: Indicates if the internal chipset is currently in an overheated state.
- **Home Assistant Entity**: `sensor.[device_name]_overheat`
- **Read-only**: Cannot be changed by user, reports protection status
- **Use cases**:
- Safety monitoring
- Alert when switch is overheating
- Diagnostic for load issues
- Automation triggers for problems
- **Behavior when "Overheated"**:
- Switch may reduce output or shut off load
- LED may indicate error state
- Switch protects itself from damage
- **Recovery**: Automatically resets when temperature drops to safe level
- **Causes**:
- Excessive load (too many bulbs/watts)
- Poor ventilation (box too small, insulation)
- High ambient temperature
- Short circuit or wiring issues
## Access Control
### localProtection
- **Type**: Select
- **Values**: "Disabled", "Enabled"
- **Default**: "Disabled"
- **Description**: Ability to control switch from the wall. When enabled, disables physical paddle control.
- **Home Assistant Entity**: `select.[device_name]_local_protection`
- **Use cases**:
- Child safety locks
- Prevent accidental changes
- Commercial applications
- Force automation-only control
- **Behavior when "Enabled"**:
- Paddle presses do nothing
- Zigbee commands still work
- Switch can only be controlled via hub/automations
- LED effects still respond to paddle (visual feedback)
- **Override**: Can be disabled via Zigbee command from hub
- **Note**: Does not affect config button or air-gap switch
### remoteProtection
- **Type**: Sensor (read-only via Zigbee2MQTT)
- **Values**: "Disabled", "Enabled"
- **Default**: "Disabled"
- **Description**: Ability to control switch from the hub.
- **Home Assistant Entity**: `sensor.[device_name]_remote_protection`
- **Read-only via Zigbee2MQTT**: Status can be read but not changed remotely
- **Use cases**:
- Prevent automation interference
- Local control only mode
- Troubleshooting automation issues
- **Behavior when "Enabled"**:
- Paddle works normally
- Zigbee on/off/dim commands ignored
- Configuration commands may still be accepted
- Switch operates as manual-only dimmer
## Configuration Patterns
### Standard Operation (No Protection)
```yaml
service: select.select_option
target:
entity_id: select.bedroom_switch_local_protection
data:
option: "Disabled"
```
### Child Lock (Paddle Disabled)
```yaml
service: select.select_option
target:
entity_id: select.bedroom_switch_local_protection
data:
option: "Enabled"
```
### Temperature Monitoring Automation
```yaml
automation:
- alias: "Inovelli Overheat Alert"
trigger:
- platform: numeric_state
entity_id: sensor.bedroom_switch_internal_temperature
above: 60
action:
- service: notify.mobile_app
data:
message: "Bedroom switch overheating: {{ states('sensor.bedroom_switch_internal_temperature') }}°C"
- alias: "Inovelli Overheat Protection Triggered"
trigger:
- platform: state
entity_id: sensor.bedroom_switch_overheat
to: "Overheated"
action:
- service: notify.mobile_app
data:
message: "ALERT: Bedroom switch overheat protection activated!"
title: "Switch Overheat"
- service: light.turn_off
entity_id: light.bedroom_switch
```
## Safety Considerations
### Overheat Protection
The switch has built-in thermal protection that cannot be disabled:
- Monitors internal temperature continuously
- Automatically reduces output if too hot
- Protects switch from permanent damage
- Resets automatically when cooled
### Common Causes of Overheating
1. **Overloaded circuit**: Too many bulbs/high wattage
2. **Poor ventilation**: Tight gang box, spray foam insulation
3. **Non-neutral wiring**: Generates more heat
4. **Ambient temperature**: Hot attic/outdoor locations
5. **Electrical issues**: Poor connections, high resistance
### Prevention
- Don't exceed rated wattage (typically 150W LED, 300W incandescent)
- Ensure adequate box size and ventilation
- Use fan/cooling for hot environments
- Regular temperature monitoring via automations
- Quality bulbs that don't overdraw current
### Emergency Procedures
If overheat protection triggers:
1. Check overheat sensor status
2. Read internalTemperature value
3. Turn off load via Zigbee if possible
4. Allow switch to cool (15-30 minutes)
5. Investigate cause before restoring power
6. Reduce load or improve ventilation
## Protection Use Cases
### Vacation Mode Child Lock
```yaml
# Before leaving, disable paddle
service: select.select_option
target:
entity_id: select.bedroom_switch_local_protection
data:
option: "Enabled"
# Configure automations for lighting schedule
```
### Critical Lighting Protection
```yaml
# For always-on circuits (security, safety)
service: select.select_option
target:
entity_id: select.bedroom_switch_local_protection
data:
option: "Enabled"
```
### Commercial Installation
```yaml
# Public spaces - prevent tampering
service: select.select_option
target:
entity_id: select.bedroom_switch_local_protection
data:
option: "Enabled"
```
## Important Notes
- localProtection can be changed remotely via Zigbee2MQTT
- remoteProtection is read-only via Zigbee2MQTT
- Physical config button can reset protections if needed
- Air-gap switch always works regardless of protection settings
- Overheat protection is hardware-based and cannot be disabled
- Temperature monitoring via internalTemperature sensor
- Local + Remote protection together creates fully locked state (not recommended)
- Temperature readings update based on reporting configuration

296
inovelli/switch-config.md Normal file
View File

@@ -0,0 +1,296 @@
# Switch Configuration Properties
Properties defining switch type, operational modes, hardware configuration, and timing behavior for Zigbee2MQTT integration.
## Switch Type & Wiring
### switchType
- **Type**: Select
- **Values**: "Single Pole", "3-Way Dumb Switch", "3-Way Aux Switch", "Single-Pole Full Sine Wave"
- **Default**: "Single Pole"
- **Description**: Configures the physical switch wiring type and companion switch behavior.
- **Home Assistant Entity**: `select.[device_name]_switch_type`
- **Use cases**:
- Single location: "Single Pole"
- Multi-location with dumb 3-way: "3-Way Dumb Switch"
- Multi-location with Aux switch: "3-Way Aux Switch"
- Ceiling fan control: "Single-Pole Full Sine Wave"
- **Important**: Must match actual wiring configuration
### powerType
- **Type**: Sensor (read-only)
- **Values**: "Non Neutral", "Neutral"
- **Description**: Detected power wiring type.
- **Home Assistant Entity**: `sensor.[device_name]_power_type`
- **Read-only**: Automatically detected by switch hardware
- **Use cases**:
- Diagnostic information
- Verify wiring configuration
- Troubleshooting installation issues
### dimmingMode
- **Type**: Sensor (read-only)
- **Values**: "Leading edge", "Trailing edge"
- **Default**: "Trailing edge"
- **Description**: Dimming method used for load control. Can only be changed at the switch.
- **Home Assistant Entity**: `sensor.[device_name]_dimming_mode`
- **Read-only via Zigbee2MQTT**: Must be configured at the physical switch
- **Use cases**:
- LED bulbs: "Trailing edge"
- Incandescent: "Leading edge"
- Troubleshooting flicker/buzz issues
- **Note**: Trailing edge only available on neutral single-pole and neutral multi-way with aux switch
## Operational Modes
### outputMode
- **Type**: Select
- **Values**: "Dimmer", "On/Off"
- **Default**: "Dimmer"
- **Description**: Switches between dimmer and on/off only operation.
- **Home Assistant Entity**: `select.[device_name]_output_mode`
- **Use cases**:
- Dimming incompatible loads: "On/Off"
- Standard operation: "Dimmer"
- User preference for simple on/off: "On/Off"
- **Behavior in On/Off mode**:
- Paddle only turns on/off (no dimming)
- Commands still accept brightness levels
- No ramp rates (instant on/off)
- Simpler operation for non-dimmable loads
### smartBulbMode
- **Type**: Select
- **Values**: "Disabled", "Smart Bulb Mode"
- **Default**: "Disabled"
- **Description**: Keeps power always on to load, disables dimming. For smart bulbs that need constant power.
- **Home Assistant Entity**: `select.[device_name]_smart_bulb_mode`
- **Use cases**:
- Regular dumb bulbs: "Disabled"
- Philips Hue, LIFX, other smart bulbs: "Smart Bulb Mode"
- Smart switches in parallel with dimmer: "Smart Bulb Mode"
- **Behavior when enabled**:
- Load receives constant full power
- Switch still sends Zigbee commands
- Paddle controls scenes/automations, not load directly
- LED bar still shows "virtual" dimming level
- **Important**: Required for smart bulbs to maintain Wi-Fi/Zigbee/Z-Wave control
### relayClick
- **Type**: Select
- **Values**: "Disabled (Click Sound On)", "Enabled (Click Sound Off)"
- **Default**: "Disabled (Click Sound On)"
- **Description**: Controls audible relay click sound. In neutral on/off setups, you may disable the click sound by creating a "simulated" on/off where the switch only turns on to 100 or off to 0.
- **Home Assistant Entity**: `select.[device_name]_relay_click`
- **Use cases**:
- Silent operation (bedrooms): "Enabled" (removes click)
- Normal operation: "Disabled" (click present)
- **Note**: Only applies to neutral on/off mode configurations
## Timing & Button Behavior
### buttonDelay
- **Type**: Select
- **Values**: "0ms", "100ms", "200ms", "300ms", "400ms", "500ms", "600ms", "700ms", "800ms", "900ms"
- **Default**: "500ms"
- **Description**: Delay before switch responds to paddle press. Allows multi-tap detection.
- **Home Assistant Entity**: `select.[device_name]_button_delay`
- **Special values**:
- "0ms" = Instant response (disables multi-tap features and button press events)
- "500ms" = Default, balanced
- "700ms"-"900ms" = More forgiving multi-tap timing
- **Use cases**:
- Instant control: "0ms" (no multi-tap)
- Default multi-tap: "500ms" (good balance)
- Reliable multi-tap: "700ms" or higher
- **Trade-off**: Higher values enable easier multi-tap but slower single-press response
## LED Display Modes
### ledBarScaling
- **Type**: Select
- **Values**: "Gen3 method (VZM-style)", "Gen2 method (LZW-style)"
- **Default**: "Gen3 method (VZM-style)"
- **Description**: Controls how LED bar represents dimmer level.
- **Home Assistant Entity**: `select.[device_name]_led_bar_scaling`
- **Use cases**: Match behavior of older Inovelli switches for consistency
### onOffLedMode
- **Type**: Select
- **Values**: "All", "One"
- **Default**: "All"
- **Description**: When in On/Off mode, use full LED bar or just one LED.
- **Home Assistant Entity**: `select.[device_name]_on_off_led_mode`
- **Use cases**:
- Match Gen 2 Red/Black series appearance: "One"
- Standard bar graph: "All"
- Reduce LED brightness/distraction: "One"
## Configuration Patterns
### Standard Single-Pole Installation
```yaml
service: select.select_option
target:
entity_id:
- select.bedroom_switch_switch_type
- select.bedroom_switch_output_mode
- select.bedroom_switch_smart_bulb_mode
data:
option: "Single Pole"
service: select.select_option
target:
entity_id: select.bedroom_switch_output_mode
data:
option: "Dimmer"
service: select.select_option
target:
entity_id: select.bedroom_switch_smart_bulb_mode
data:
option: "Disabled"
```
### 3-Way with Aux Switch
```yaml
service: select.select_option
target:
entity_id: select.bedroom_switch_switch_type
data:
option: "3-Way Aux Switch"
service: select.select_option
target:
entity_id: select.bedroom_switch_button_delay
data:
option: "500ms" # Allow multi-tap
```
### Smart Bulb Control
```yaml
service: select.select_option
target:
entity_id: select.bedroom_switch_switch_type
data:
option: "Single Pole"
service: select.select_option
target:
entity_id: select.bedroom_switch_smart_bulb_mode
data:
option: "Smart Bulb Mode"
service: select.select_option
target:
entity_id: select.bedroom_switch_output_mode
data:
option: "Dimmer" # Virtual dimming for scenes
```
### Non-Dimmable Load
```yaml
service: select.select_option
target:
entity_id: select.bedroom_switch_output_mode
data:
option: "On/Off"
```
### Silent Operation (No Relay Click)
```yaml
service: select.select_option
target:
entity_id: select.bedroom_switch_relay_click
data:
option: "Enabled" # Removes click sound
```
### Multi-Tap Optimization
```yaml
service: select.select_option
target:
entity_id: select.bedroom_switch_button_delay
data:
option: "700ms" # Reliable double-tap detection
# Also enable double-tap shortcuts
service: select.select_option
target:
entity_id:
- select.bedroom_switch_double_tap_up_to_param55
- select.bedroom_switch_double_tap_down_to_param56
data:
option: "Enabled"
```
### Instant Response (No Scenes)
```yaml
service: select.select_option
target:
entity_id: select.bedroom_switch_button_delay
data:
option: "0ms" # Instant, but disables button events
# Note: 0ms disables multi-tap and button press events entirely
```
## Troubleshooting Guide
### Bulb Flickers
- Check dimmingMode (can only be changed at switch, not via Zigbee2MQTT)
- Increase minimumLevel property
- Verify bulb is dimmable
- Try smartBulbMode if using smart bulbs
### Buzzing/Humming
- Try changing dimmingMode at the physical switch
- Reduce load (fewer bulbs)
- Verify bulb compatibility with dimmer
### Aux Switch Not Working
- Verify switchType = "3-Way Aux Switch"
- Check wiring: Line, Load, Traveler
- Ensure Aux switch is compatible (GE/Inovelli)
### Smart Bulbs Lose Connection
- Enable smartBulbMode = "Smart Bulb Mode"
- This keeps power constant to bulbs
### Switch Too Slow/Too Fast
- Adjust buttonDelay
- Lower = faster response, harder multi-tap
- Higher = slower response, easier multi-tap
- "0ms" disables button events entirely
### Non-Neutral Installation Issues
- Check powerType sensor to verify detection
- Ensure minimum load requirements met
- May need bypass capacitor for LED loads
- Consider higherOutputInNonNeutral option
## Important Notes
- dimmingMode can only be changed at the physical switch, not via Zigbee2MQTT
- powerType is automatically detected and read-only
- smartBulbMode is essential for any smart bulb integration
- buttonDelay of "0ms" completely disables button press events and multi-tap
- relayClick only applies to specific neutral on/off configurations
- switchType must match your actual wiring for proper operation
- LED scaling and mode options provide compatibility with older Inovelli switches

View File

@@ -0,0 +1,341 @@
# Timers & Automation Properties
Properties for time-based features including auto-off timers, LED timeouts, multi-tap shortcuts, and button press events via Zigbee2MQTT.
## Auto-Off Timer
### autoTimerOff
- **Type**: Number
- **Range**: 0-32767
- **Default**: 0 (disabled)
- **Unit**: Seconds
- **Description**: Automatically turns the switch off after this many seconds. When the switch is turned on a timer is started. When the timer expires, the switch is turned off. 0 = Auto off is disabled.
- **Home Assistant Entity**: `number.[device_name]_auto_timer_off`
- **Special values**:
- `0` = Disabled (no auto-off)
- `1-32767` = Time in seconds before auto-off
- **Use cases**:
- Bathroom fan auto-off
- Closet lights safety shutoff
- Energy saving for forgotten lights
- Timed task lighting
- **Common values**:
- 3 minutes: `180`
- 5 minutes: `300`
- 15 minutes: `900`
- 30 minutes: `1800`
- 1 hour: `3600`
- 2 hours: `7200`
- **Behavior**:
- Timer starts when load is turned on
- Resets if manually turned off then on again
- Works for both local (paddle) and remote (hub) activation
- Switch turns off automatically when timer expires
- **Maximum**: ~9 hours (32767 seconds)
## LED Indicator Timeout
### loadLevelIndicatorTimeout
- **Type**: Select
- **Values**: "Stay Off", "1 Second", "2 Seconds", "3 Seconds", "4 Seconds", "5 Seconds", "6 Seconds", "7 Seconds", "8 Seconds", "9 Seconds", "10 Seconds", "Stay On"
- **Default**: "3 Seconds"
- **Description**: Shows the level that the load is at for x number of seconds after the load is adjusted and then returns to the Default LED state. 0 = Stay Off, 1-10 = seconds, 11 = Stay On.
- **Home Assistant Entity**: `select.[device_name]_load_level_indicator_timeout`
- **Use cases**:
- Show brightness level briefly after adjustment
- Return to default LED color/intensity after timeout
- Visual feedback for dimming changes
- **Behavior**:
- When brightness is adjusted
- LED bar shows actual load level
- After timeout, returns to configured LED state (ledColorWhen*, ledIntensityWhen*)
## Multi-Tap Shortcuts
### doubleTapUpToParam55
- **Type**: Select
- **Values**: "Disabled", "Enabled"
- **Default**: "Disabled"
- **Description**: Enable or Disable setting level to brightnessLevelForDoubleTapUp on double-tap UP.
- **Home Assistant Entity**: `select.[device_name]_double_tap_up_to_param55`
- **Use cases**:
- Quick full-bright shortcut
- Task lighting activation
- Scene trigger for bright preset
- **Prerequisites**:
- Requires buttonDelay > "0ms" for multi-tap detection
- Target level set in brightnessLevelForDoubleTapUp
- **Behavior**:
- Works from any current brightness or off state
- Jumps directly to brightnessLevelForDoubleTapUp level
- Can be used to trigger automations via action events
### doubleTapDownToParam56
- **Type**: Select
- **Values**: "Disabled", "Enabled"
- **Default**: "Disabled"
- **Description**: Enable or Disable setting level to brightnessLevelForDoubleTapDown on double-tap DOWN.
- **Home Assistant Entity**: `select.[device_name]_double_tap_down_to_param56`
- **Use cases**:
- Quick dim/nightlight mode
- Quick off shortcut
- Scene trigger for dim preset
- **Prerequisites**:
- Requires buttonDelay > "0ms" for multi-tap detection
- Target level set in brightnessLevelForDoubleTapDown
- **Behavior**:
- Works from any current brightness
- Jumps directly to brightnessLevelForDoubleTapDown level
- If brightnessLevelForDoubleTapDown = 0, turns off
- Can be used to trigger automations via action events
## Button Press Events
### action
- **Type**: Sensor (read-only, event-based)
- **Description**: Triggered action (e.g. a button click). Events are published to this entity when paddle/config button is pressed.
- **Home Assistant Entity**: `event.[device_name]_action`
- **Event values**:
- `down_single`, `up_single`, `config_single` - Single tap
- `down_release`, `up_release`, `config_release` - Button released
- `down_held`, `up_held`, `config_held` - Button held
- `down_double`, `up_double`, `config_double` - Double tap
- `down_triple`, `up_triple`, `config_triple` - Triple tap
- `down_quadruple`, `up_quadruple`, `config_quadruple` - Quadruple tap
- `down_quintuple`, `up_quintuple`, `config_quintuple` - Quintuple tap
- **Use cases**:
- Trigger Home Assistant automations based on button presses
- Multi-tap scene control
- Advanced automation logic
- **Prerequisites**: buttonDelay > "0ms" (setting to "0ms" disables button events)
## Configuration Patterns
### Bathroom Fan Auto-Off (15 minutes)
```yaml
service: number.set_value
target:
entity_id: number.bathroom_fan_auto_timer_off
data:
value: 900 # 15 minutes
```
### Closet Light Safety (5 minutes)
```yaml
service: number.set_value
target:
entity_id: number.closet_light_auto_timer_off
data:
value: 300 # 5 minutes
```
### Quick Brightness Shortcuts
```yaml
# Enable button delay for multi-tap detection
service: select.select_option
target:
entity_id: select.bedroom_switch_button_delay
data:
option: "500ms"
# Enable double-tap up
service: select.select_option
target:
entity_id: select.bedroom_switch_double_tap_up_to_param55
data:
option: "Enabled"
# Set bright level for double-tap up
service: number.set_value
target:
entity_id: number.bedroom_switch_brightness_level_for_double_tap_up
data:
value: 254 # Nearly full brightness
# Enable double-tap down
service: select.select_option
target:
entity_id: select.bedroom_switch_double_tap_down_to_param56
data:
option: "Enabled"
# Set nightlight level for double-tap down
service: number.set_value
target:
entity_id: number.bedroom_switch_brightness_level_for_double_tap_down
data:
value: 20 # Dim nightlight
```
### LED Level Indicator Timing
```yaml
# Show level for 5 seconds after adjustment
service: select.select_option
target:
entity_id: select.bedroom_switch_load_level_indicator_timeout
data:
option: "5 Seconds"
```
## Button Press Automation Examples
### Double-Tap Scene Trigger
```yaml
automation:
- alias: "Bedroom Double-Tap Up - Movie Mode"
trigger:
- platform: state
entity_id: sensor.bedroom_switch_action
to: "up_double"
action:
- service: scene.turn_on
target:
entity_id: scene.movie_mode
- alias: "Bedroom Double-Tap Down - Nighttime"
trigger:
- platform: state
entity_id: sensor.bedroom_switch_action
to: "down_double"
action:
- service: scene.turn_on
target:
entity_id: scene.nighttime
```
### Triple-Tap for All Lights
```yaml
automation:
- alias: "Kitchen Triple-Tap Up - All Lights On"
trigger:
- platform: state
entity_id: sensor.kitchen_switch_action
to: "up_triple"
action:
- service: light.turn_on
target:
entity_id: all
- alias: "Kitchen Triple-Tap Down - All Lights Off"
trigger:
- platform: state
entity_id: sensor.kitchen_switch_action
to: "down_triple"
action:
- service: light.turn_off
target:
entity_id: all
```
### Config Button Custom Action
```yaml
automation:
- alias: "Config Button - Toggle Guest Mode"
trigger:
- platform: state
entity_id: sensor.bedroom_switch_action
to: "config_double"
action:
- service: input_boolean.toggle
target:
entity_id: input_boolean.guest_mode
```
### Held Button for Scenes
```yaml
automation:
- alias: "Up Held - Gradually Brighten"
trigger:
- platform: state
entity_id: sensor.bedroom_switch_action
to: "up_held"
action:
- service: light.turn_on
target:
entity_id: light.bedroom_switch
data:
brightness_pct: 100
transition: 10
- alias: "Down Held - Gradually Dim"
trigger:
- platform: state
entity_id: sensor.bedroom_switch_action
to: "down_held"
action:
- service: light.turn_on
target:
entity_id: light.bedroom_switch
data:
brightness_pct: 1
transition: 10
```
## Auto-Off Timer Examples
### Common Applications
**Bathroom Exhaust Fan**
```yaml
# 15 minutes
service: number.set_value
target:
entity_id: number.bathroom_fan_auto_timer_off
data:
value: 900
```
**Laundry Room**
```yaml
# 1 hour
service: number.set_value
target:
entity_id: number.laundry_room_auto_timer_off
data:
value: 3600
```
**Garage Workshop**
```yaml
# 2 hours
service: number.set_value
target:
entity_id: number.garage_auto_timer_off
data:
value: 7200
```
**Pantry/Closet**
```yaml
# 3 minutes
service: number.set_value
target:
entity_id: number.pantry_auto_timer_off
data:
value: 180
```
## Important Notes
- autoTimerOff works independently of other features
- loadLevelIndicatorTimeout only affects load level display, not LED effects
- Multi-tap features require buttonDelay > "0ms" for detection
- Setting buttonDelay to "0ms" disables ALL button events (action sensor)
- Double-tap can both change brightness AND trigger automations via action events
- action sensor events can trigger automations for any tap pattern
- Auto-off timer resets on each manual on/off cycle
- Button events are published to the action sensor for Home Assistant automations
- Use action events for complex scene control and multi-location logic

View File

@@ -1,127 +0,0 @@
blueprint:
name: Multi-Press Action
description: Trigger different actions based on how many times an entity changes state rapidly
domain: automation
input:
trigger_entity:
name: Trigger Entity
description: The entity to monitor for state changes
selector:
entity: {}
press_counter:
name: Multi-Press Counter
description: House-wide counter helper for tracking presses (create counter.multi_press_counter)
default: counter.multi_press_counter
selector:
entity:
domain: counter
time_window:
name: Time Window
description: Maximum time between presses (in seconds)
default: 1.5
selector:
number:
min: 0.5
max: 5
step: 0.1
unit_of_measurement: seconds
immediate_single_press:
name: Execute Single Press Immediately
description: If enabled, single press action runs immediately without waiting. If disabled, waits to see if it's a multi-press before acting.
default: true
selector:
boolean: {}
single_press_action:
name: Single Press Action
description: Action to run on single press
default: []
selector:
action: {}
double_press_action:
name: Double Press Action
description: Action to run on double press
default: []
selector:
action: {}
triple_press_action:
name: Triple Press Action
description: Action to run on triple press
default: []
selector:
action: {}
quad_press_action:
name: Quad Press Action
description: Action to run on quad press (4 times)
default: []
selector:
action: {}
mode: restart
max_exceeded: silent
trigger:
- platform: state
entity_id: !input trigger_entity
action:
- variables:
time_window: !input time_window
immediate: !input immediate_single_press
counter_entity: !input press_counter
# Increment the counter (each restart = new press)
- action: counter.increment
target:
entity_id: !input press_counter
# Execute single press immediately if enabled
- if:
- condition: template
value_template: "{{ immediate and states(counter_entity) | int == 1 }}"
then:
- choose:
- conditions: []
sequence: !input single_press_action
# Wait for the time window to see if more presses come
- delay:
seconds: "{{ time_window }}"
# Get final press count and execute appropriate action
- variables:
final_count: "{{ states(counter_entity) | int }}"
# Reset counter before executing actions
- action: counter.reset
target:
entity_id: !input press_counter
# Execute action based on final press count
- choose:
# Only run single press if NOT immediate (delayed mode)
- conditions:
- condition: template
value_template: "{{ final_count == 1 and not immediate }}"
sequence: !input single_press_action
- conditions:
- condition: template
value_template: "{{ final_count == 2 }}"
sequence: !input double_press_action
- conditions:
- condition: template
value_template: "{{ final_count == 3 }}"
sequence: !input triple_press_action
- conditions:
- condition: template
value_template: "{{ final_count >= 4 }}"
sequence: !input quad_press_action

View File

@@ -0,0 +1,235 @@
# packages/adaptive_lighting_bedroom_template.yaml
#
# Adaptive Lighting Mode System - Bedroom Template
#
# CUSTOMIZATION INSTRUCTIONS:
# 1. Copy this file to a new file named after your room (e.g., adaptive_lighting_master_bedroom.yaml)
# 2. Search and replace "bedroom" with your room name throughout
# 3. Update entity IDs to match your actual devices
# 4. Adjust available modes in input_select as desired
# 5. Customize mode settings in the automation
# 6. Place in config/packages/ directory
#
# Prerequisites:
# - packages/adaptive_lighting_global.yaml loaded
# - Adaptive Lighting integration installed
# - Adaptive Lighting switch created for this room
# - Inovelli Blue Dimmer paired with Zigbee2MQTT in Smart Bulb Mode
#
# Reference: ADAPTIVE_LIGHTING_CONTROL_SYSTEM_DESIGN.md lines 1589-1672
# =============================================================================
# INPUT HELPERS
# =============================================================================
input_select:
bedroom_lighting_mode:
name: "Bedroom Lighting Mode"
options:
- "Adaptive" # Standard AL following sun
- "Reading" # Bright, cool white
- "Relaxing" # Dim, warm white
- "Sleep" # Very dim, red/amber
- "Manual Override" # Full user control, AL paused
initial: "Adaptive"
icon: mdi:lightbulb-multiple
input_boolean:
bedroom_weekend_mode:
name: "Bedroom Weekend Mode"
icon: mdi:sleep
initial: off
# =============================================================================
# AUTOMATIONS
# =============================================================================
automation:
# ---------------------------------------------------------------------------
# Mode Application
# ---------------------------------------------------------------------------
# When mode changes, apply appropriate Adaptive Lighting settings
# Reference: ADAPTIVE_LIGHTING_CONTROL_SYSTEM_DESIGN.md lines 192-306
# ---------------------------------------------------------------------------
- id: bedroom_apply_lighting_mode
alias: "Bedroom: Apply Lighting Mode Settings"
description: "Apply AL settings based on selected lighting mode"
mode: restart
trigger:
- platform: state
entity_id: input_select.bedroom_lighting_mode
- platform: homeassistant
event: start
variables:
mode: "{{ states('input_select.bedroom_lighting_mode') }}"
switch_entity: "switch.adaptive_lighting_bedroom" # UPDATE THIS
mode_colors: "{{ states('input_text.adaptive_lighting_mode_colors') | from_json }}"
action:
- choose:
# Adaptive Mode - Standard AL following sun
- conditions:
- condition: template
value_template: "{{ mode == 'Adaptive' }}"
sequence:
- service: adaptive_lighting.set_manual_control
data:
entity_id: "{{ switch_entity }}"
manual_control: false
- service: adaptive_lighting.change_switch_settings
target:
entity_id: "{{ switch_entity }}"
data:
use_defaults: configuration
# Reading Mode - Bright cool white
# Option 1: Read from centralized settings (recommended for maintainability)
- conditions:
- condition: template
value_template: "{{ mode == 'Reading' }}"
sequence:
- variables:
settings: "{{ states('input_text.adaptive_lighting_settings_reading') | from_json }}"
- service: adaptive_lighting.set_manual_control
data:
entity_id: "{{ switch_entity }}"
manual_control: false
- service: adaptive_lighting.change_switch_settings
target:
entity_id: "{{ switch_entity }}"
data: "{{ settings | combine({'use_defaults': 'current'}) }}"
# Alternative: Hardcode values directly (simpler but less maintainable)
# - conditions:
# - condition: template
# value_template: "{{ mode == 'Reading' }}"
# sequence:
# - service: adaptive_lighting.change_switch_settings
# data:
# min_brightness: 80
# max_brightness: 100
# min_color_temp: 4500
# max_color_temp: 5500
# transition: 2
# use_defaults: current
# Relaxing Mode - Dim warm white
- conditions:
- condition: template
value_template: "{{ mode == 'Relaxing' }}"
sequence:
- variables:
settings: "{{ states('input_text.adaptive_lighting_settings_relaxing') | from_json }}"
- service: adaptive_lighting.set_manual_control
data:
entity_id: "{{ switch_entity }}"
manual_control: false
- service: adaptive_lighting.change_switch_settings
target:
entity_id: "{{ switch_entity }}"
data: "{{ settings | combine({'use_defaults': 'current'}) }}"
# Sleep Mode - Very dim red/amber
- conditions:
- condition: template
value_template: "{{ mode == 'Sleep' }}"
sequence:
- variables:
settings: "{{ states('input_text.adaptive_lighting_settings_sleep') | from_json }}"
- service: adaptive_lighting.set_manual_control
data:
entity_id: "{{ switch_entity }}"
manual_control: false
- service: adaptive_lighting.change_switch_settings
target:
entity_id: "{{ switch_entity }}"
data: "{{ settings | combine({'use_defaults': 'current'}) }}"
# Manual Override - Pause AL completely
- conditions:
- condition: template
value_template: "{{ mode == 'Manual Override' }}"
sequence:
- service: adaptive_lighting.set_manual_control
data:
entity_id: "{{ switch_entity }}"
manual_control: true
# Update LED color on Inovelli switch to match mode
# NOTE: Update entity_id to match your switch
- service: number.set_value
target:
entity_id: number.bedroom_switch_led_color_when_on # UPDATE THIS
data:
value: "{{ mode_colors.get(mode, 170) }}"
# ---------------------------------------------------------------------------
# Weekend Mode - Auto Enable/Disable
# ---------------------------------------------------------------------------
# Reference: ADAPTIVE_LIGHTING_CONTROL_SYSTEM_DESIGN.md lines 894-926
# ---------------------------------------------------------------------------
- id: bedroom_weekend_mode_auto_enable
alias: "Bedroom: Enable Weekend Mode Friday/Saturday"
trigger:
- platform: time
at: "22:00:00"
condition:
- condition: time
weekday: ["fri", "sat"]
action:
- service: input_boolean.turn_on
target:
entity_id: input_boolean.bedroom_weekend_mode
- id: bedroom_weekend_mode_auto_disable
alias: "Bedroom: Disable Weekend Mode Sunday-Thursday"
trigger:
- platform: time
at: "22:00:00"
condition:
- condition: time
weekday: ["sun", "mon", "tue", "wed", "thu"]
action:
- service: input_boolean.turn_off
target:
entity_id: input_boolean.bedroom_weekend_mode
# ---------------------------------------------------------------------------
# Weekend Mode - Apply AL Adjustments
# ---------------------------------------------------------------------------
# Reference: ADAPTIVE_LIGHTING_CONTROL_SYSTEM_DESIGN.md lines 928-961
# ---------------------------------------------------------------------------
- id: bedroom_weekend_mode_apply
alias: "Bedroom: Apply Weekend Mode AL Adjustments"
trigger:
- platform: state
entity_id: input_boolean.bedroom_weekend_mode
- platform: homeassistant
event: start
variables:
weekend_mode: "{{ is_state('input_boolean.bedroom_weekend_mode', 'on') }}"
switch_entity: "switch.adaptive_lighting_bedroom" # UPDATE THIS
action:
- choose:
- conditions:
- condition: template
value_template: "{{ weekend_mode }}"
sequence:
# Weekend settings: Later sunrise, lower max brightness
- service: adaptive_lighting.change_switch_settings
target:
entity_id: "{{ switch_entity }}"
data:
sunrise_time: "10:00:00"
sunset_time: "01:00:00"
max_brightness: 60
use_defaults: current
- conditions:
- condition: template
value_template: "{{ not weekend_mode }}"
sequence:
# Weekday settings: Reset to defaults
- service: adaptive_lighting.change_switch_settings
target:
entity_id: "{{ switch_entity }}"
data:
use_defaults: configuration

View File

@@ -0,0 +1,114 @@
# packages/adaptive_lighting_global.yaml
#
# Global constants for Adaptive Lighting Mode System
# This file is shared across all rooms and should be version controlled.
#
# To use: Place in config/packages/ directory
# Enable packages in configuration.yaml:
# homeassistant:
# packages: !include_dir_named packages/
# =============================================================================
# MODE COLOR MAPPINGS (ROYGBIV Scheme)
# =============================================================================
# These colors are used for LED feedback on Inovelli switches
# Values are hue (0-255) for Zigbee2MQTT ledColorWhenOn/Off parameter
#
# Reference ADAPTIVE_LIGHTING_CONTROL_SYSTEM_DESIGN.md lines 112-131
# =============================================================================
input_text:
adaptive_lighting_mode_colors:
name: "AL Mode Color Mappings (JSON)"
max: 255
# JSON minified to fit in 255 char limit
initial: >-
{"Adaptive":170,"Reading":42,"Relaxing":21,"Sleep":0,
"Manual Override":212,"Theater":127,"Party":234,"Homework":85,
"Play":148,"Cooking":42,"Dining":21,"Cleanup":170}
# =============================================================================
# MODE SETTINGS DEFINITIONS
# =============================================================================
# Each mode has its own input_text helper to stay within 255 char limit
# Room automations read these to apply appropriate AL settings
# =============================================================================
# Adaptive mode - uses default AL configuration
adaptive_lighting_settings_adaptive:
name: "AL Settings: Adaptive"
max: 255
initial: '{"use_defaults":"configuration"}'
# Reading mode - bright, cool white
adaptive_lighting_settings_reading:
name: "AL Settings: Reading"
max: 255
initial: '{"min_brightness":80,"max_brightness":100,"min_color_temp":4500,"max_color_temp":5500,"transition":2}'
# Relaxing mode - dim, warm white
adaptive_lighting_settings_relaxing:
name: "AL Settings: Relaxing"
max: 255
initial: '{"min_brightness":20,"max_brightness":40,"min_color_temp":2000,"max_color_temp":2500,"transition":5}'
# Sleep mode - very dim red/amber
adaptive_lighting_settings_sleep:
name: "AL Settings: Sleep"
max: 255
initial: '{"min_brightness":1,"max_brightness":5,"min_color_temp":2000,"sleep_rgb_color":[255,50,0],"transition":2}'
# Theater mode - dim, cool for movies
adaptive_lighting_settings_theater:
name: "AL Settings: Theater"
max: 255
initial: '{"min_brightness":5,"max_brightness":20,"min_color_temp":3000,"max_color_temp":4000,"transition":3}'
# Party mode - bright, dynamic for socializing
adaptive_lighting_settings_party:
name: "AL Settings: Party"
max: 255
initial: '{"min_brightness":60,"max_brightness":90,"min_color_temp":3500,"max_color_temp":4500,"transition":1}'
# Homework mode - bright, neutral for focus
adaptive_lighting_settings_homework:
name: "AL Settings: Homework"
max: 255
initial: '{"min_brightness":85,"max_brightness":100,"min_color_temp":4000,"max_color_temp":5000,"transition":2}'
# Play mode - medium bright, energizing
adaptive_lighting_settings_play:
name: "AL Settings: Play"
max: 255
initial: '{"min_brightness":60,"max_brightness":85,"min_color_temp":4000,"max_color_temp":5000,"transition":2}'
# Cooking mode - bright, cool task lighting
adaptive_lighting_settings_cooking:
name: "AL Settings: Cooking"
max: 255
initial: '{"min_brightness":90,"max_brightness":100,"min_color_temp":4500,"max_color_temp":5500,"transition":1}'
# Dining mode - medium, warm for meals
adaptive_lighting_settings_dining:
name: "AL Settings: Dining"
max: 255
initial: '{"min_brightness":40,"max_brightness":70,"min_color_temp":2500,"max_color_temp":3500,"transition":3}'
# Cleanup mode - bright, standard for cleaning
adaptive_lighting_settings_cleanup:
name: "AL Settings: Cleanup"
max: 255
initial: '{"min_brightness":80,"max_brightness":100,"min_color_temp":4000,"max_color_temp":5000,"transition":1}'
# Manual Override mode - pauses AL completely (no settings needed)
# =============================================================================
# USAGE NOTES
# =============================================================================
# To access mode colors in templates:
# {% set colors = states('input_text.adaptive_lighting_mode_colors') | from_json %}
# {{ colors.get('Reading', 170) }}
#
# To access mode settings in templates:
# {% set settings = states('input_text.adaptive_lighting_settings_reading') | from_json %}
# {{ settings.min_brightness }}

View File

@@ -0,0 +1,122 @@
# packages/adaptive_lighting_living_room_template.yaml
#
# Adaptive Lighting Mode System - Living Room Template
#
# CUSTOMIZATION INSTRUCTIONS:
# 1. Copy this file and rename for your room
# 2. Search and replace "living_room" with your room name
# 3. Update entity IDs to match your devices
# 4. Adjust modes as desired
# 5. Place in config/packages/ directory
#
# Reference: ADAPTIVE_LIGHTING_CONTROL_SYSTEM_DESIGN.md lines 1512-1587
# =============================================================================
# INPUT HELPERS
# =============================================================================
input_select:
living_room_lighting_mode:
name: "Living Room Lighting Mode"
options:
- "Adaptive"
- "Theater"
- "Party"
- "Reading"
initial: "Adaptive"
icon: mdi:lightbulb-multiple
# =============================================================================
# AUTOMATIONS
# =============================================================================
automation:
# ---------------------------------------------------------------------------
# Mode Application
# ---------------------------------------------------------------------------
- id: living_room_apply_lighting_mode
alias: "Living Room: Apply Lighting Mode Settings"
mode: restart
trigger:
- platform: state
entity_id: input_select.living_room_lighting_mode
- platform: homeassistant
event: start
variables:
mode: "{{ states('input_select.living_room_lighting_mode') }}"
switch_entity: "switch.adaptive_lighting_living_room" # UPDATE THIS
mode_colors: "{{ states('input_text.adaptive_lighting_mode_colors') | from_json }}"
action:
- choose:
- conditions: "{{ mode == 'Adaptive' }}"
sequence:
- service: adaptive_lighting.set_manual_control
data:
entity_id: "{{ switch_entity }}"
manual_control: false
- service: adaptive_lighting.change_switch_settings
target:
entity_id: "{{ switch_entity }}"
data:
use_defaults: configuration
- conditions: "{{ mode == 'Theater' }}"
sequence:
- variables:
settings: "{{ states('input_text.adaptive_lighting_settings_theater') | from_json }}"
- service: adaptive_lighting.set_manual_control
data:
entity_id: "{{ switch_entity }}"
manual_control: false
- service: adaptive_lighting.change_switch_settings
target:
entity_id: "{{ switch_entity }}"
data: "{{ settings | combine({'use_defaults': 'current'}) }}"
- conditions: "{{ mode == 'Party' }}"
sequence:
- variables:
settings: "{{ states('input_text.adaptive_lighting_settings_party') | from_json }}"
- service: adaptive_lighting.set_manual_control
data:
entity_id: "{{ switch_entity }}"
manual_control: false
- service: adaptive_lighting.change_switch_settings
target:
entity_id: "{{ switch_entity }}"
data: "{{ settings | combine({'use_defaults': 'current'}) }}"
- conditions: "{{ mode == 'Reading' }}"
sequence:
- variables:
settings: "{{ states('input_text.adaptive_lighting_settings_reading') | from_json }}"
- service: adaptive_lighting.set_manual_control
data:
entity_id: "{{ switch_entity }}"
manual_control: false
- service: adaptive_lighting.change_switch_settings
target:
entity_id: "{{ switch_entity }}"
data: "{{ settings | combine({'use_defaults': 'current'}) }}"
- service: number.set_value
target:
entity_id: number.living_room_switch_led_color_when_on # UPDATE THIS
data:
value: "{{ mode_colors.get(mode, 170) }}"
# ---------------------------------------------------------------------------
# Auto-Reset Mode to Adaptive When Lights Turn Off
# ---------------------------------------------------------------------------
- id: living_room_reset_mode_on_off
alias: "Living Room: Reset Mode to Adaptive When Off"
trigger:
- platform: state
entity_id: light.living_room_lights # UPDATE THIS
to: 'off'
action:
- service: input_select.select_option
target:
entity_id: input_select.living_room_lighting_mode
data:
option: "Adaptive"

View File

@@ -0,0 +1,38 @@
# packages/adaptive_lighting_simple_template.yaml
#
# Adaptive Lighting Mode System - Simple Template
#
# For rooms that only need basic Adaptive Lighting without mode switching.
# Example: Bathrooms, closets, hallways
#
# CUSTOMIZATION INSTRUCTIONS:
# 1. Copy and rename for your room
# 2. Replace "simple_room" with your room name
# 3. Update entity IDs
# 4. This template has NO mode cycling (Adaptive only)
#
# For button actions like brightness boost, use the inovelli_button_actions blueprint
# =============================================================================
# CONFIGURATION
# =============================================================================
# No input_select needed - always in Adaptive mode
# =============================================================================
# AUTOMATIONS
# =============================================================================
automation:
# ---------------------------------------------------------------------------
# Ensure AL is Always Active
# ---------------------------------------------------------------------------
- id: simple_room_ensure_adaptive_lighting
alias: "Simple Room: Ensure Adaptive Lighting Active"
trigger:
- platform: homeassistant
event: start
action:
- service: adaptive_lighting.set_manual_control
data:
entity_id: switch.adaptive_lighting_simple_room # UPDATE THIS
manual_control: false