John Ogle 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
2025-10-25 21:51:01 -07:00

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 (coming soon)
  • presence_mode_reset.yaml - Auto-reset on room exit (coming soon)

Packages (Templates):

  • adaptive_lighting_global.yaml - Shared mode definitions and colors
  • adaptive_lighting_bedroom_template.yaml - Complete bedroom example (coming soon)
  • adaptive_lighting_living_room_template.yaml - Living room example (coming soon)

Quick Start

See PACKAGE_SETUP_GUIDE.md for detailed setup instructions.

Prerequisites:

  • Home Assistant with Adaptive Lighting integration installed
  • Inovelli Blue Dimmer Switches (VZM31-SN) via Zigbee2MQTT
  • Switches configured in Smart Bulb Mode

Installation:

  1. Enable packages in configuration.yaml
  2. Copy packages/adaptive_lighting_global.yaml to your config/packages/ directory
  3. Import blueprints via Home Assistant UI
  4. Create automations from blueprints for each room

Import URLs

Blueprints:

https://git.johnogle.info/johno/home-assistant-blueprints/raw/branch/main/blueprints/automation/inovelli_mode_cycling.yaml

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.

Import URL

https://git.johnogle.info/johno/home-assistant-blueprints/raw/branch/main/occupancy_controlled_lights.yaml

Installation

Method 1: Import via UI

  1. Go to Settings → Automations & Scenes → Blueprints
  2. Click "Import Blueprint" (blue button, bottom right)
  3. Paste the import URL above
  4. Click "Preview" then "Import"

Method 2: Manual Installation

  1. Download the blueprint file
  2. Place it in /config/blueprints/automation/occupancy_controlled_lights.yaml
  3. Restart Home Assistant or reload automations

Features

  • Occupancy-based control: Automatically turns lights on/off based on presence
  • Adaptive lighting support: Optional integration with Adaptive Lighting component
  • Configurable transitions: Set different fade times for on/off
  • Fallback support: Works with or without adaptive lighting
  • Multiple light support: Control single lights or groups

Configuration Options

Input Description Default
Occupancy Sensor Binary sensor that detects occupancy/presence Required
Lights Light entities to control Required
Adaptive Lighting Switch Adaptive lighting switch for this room. Leave empty to use simple on/off without adaptive lighting. Optional
Turn On Transition Transition time when turning lights on (seconds) 5
Turn Off Transition Transition time when turning lights off (seconds) 15
Adapt Brightness Whether to adapt brightness with adaptive lighting Yes
Adapt Color Whether to adapt color with adaptive lighting Yes

Usage Examples

Example 1: Basic Room with Adaptive Lighting

Configuration:

  • Occupancy Sensor: binary_sensor.living_room_occupancy
  • Lights: light.living_room_lights
  • Adaptive Lighting Switch: switch.adaptive_lighting_living_room
  • Turn On Transition: 3 seconds
  • Turn Off Transition: 10 seconds

Example 2: Simple On/Off Mode (without Adaptive Lighting)

Use Case: Control lights with simple on/off without adaptive lighting adjustments.

Configuration:

  • Occupancy Sensor: binary_sensor.kitchen_motion
  • Lights: light.kitchen_ceiling, light.kitchen_under_cabinet
  • Adaptive Lighting Switch: Leave empty (default)
  • Turn On Transition: 1 second
  • Turn Off Transition: 5 seconds
  • Adapt Brightness: Not applicable (no adaptive lighting switch)
  • Adapt Color: Not applicable (no adaptive lighting switch)

Example 3: Bedroom with Gentle Transitions

Configuration:

  • Occupancy Sensor: binary_sensor.bedroom_presence
  • Lights: light.bedroom_lights
  • Adaptive Lighting Switch: switch.adaptive_lighting_bedroom
  • Turn On Transition: 10 seconds (gentle wake-up)
  • Turn Off Transition: 30 seconds (gradual fade)

How It Works

  1. Occupancy Detected: When the sensor state changes to "on" (occupied):

    • If an Adaptive Lighting switch is configured AND enabled, applies adaptive lighting settings
    • If the Adaptive Lighting switch is left empty OR is disabled, turns lights on with simple on/off using the specified transition time
  2. No Occupancy: When the sensor state changes to "off" (not occupied):

    • Turns off all specified lights with configured transition time

Tips

  • Sensor Selection: Works best with presence sensors (mmWave) for continuous detection
  • Transition Times: Longer transitions feel more natural but may delay response
  • Adaptive Lighting: Requires the Adaptive Lighting integration to be installed
  • Light Groups: You can target light groups for easier management

Troubleshooting

Lights not turning on:

  • Verify occupancy sensor is working and changing state
  • Check that light entities are correct and responsive
  • Ensure adaptive lighting switch exists if specified

Lights turning off too quickly:

  • Check occupancy sensor timeout settings
  • Some PIR sensors have short detection windows

Adaptive lighting not working:

  • Verify Adaptive Lighting integration is installed
  • Check that the switch entity exists and is enabled
  • Make sure the switch covers the target lights

Multi-Press Action Blueprint

Trigger different actions based on how many times an entity changes state rapidly. Perfect for light switches, buttons, or any entity where you want single, double, triple, or quad-press actions.

Import URL

https://git.johnogle.info/johno/home-assistant-blueprints/raw/branch/main/multi_press_action.yaml

Installation

Method 1: Import via UI

  1. Go to Settings → Automations & Scenes → Blueprints
  2. Click "Import Blueprint" (blue button, bottom right)
  3. Paste the import URL above
  4. Click "Preview" then "Import"

Method 2: Manual Installation

  1. Download the blueprint file
  2. Place it in /config/blueprints/automation/multi_press_action.yaml
  3. Restart Home Assistant or reload automations

Features

  • Configurable time window: Set how quickly presses must occur (default 1.5s)
  • Immediate or delayed single-press: Choose whether single press acts instantly or waits
  • Up to 4 press levels: Single, double, triple, and quad press actions
  • Complex action support: Each action can include conditions, scenes, scripts, and more

Configuration Options

Input Description Default
Trigger Entity The entity to monitor for state changes Required
Time Window Maximum time between presses (seconds) 1.5
Execute Single Press Immediately Run single press action without waiting Yes
Single Press Action Action(s) to run on single press None
Double Press Action Action(s) to run on double press None
Triple Press Action Action(s) to run on triple press None
Quad Press Action Action(s) to run on quad press (4 times) None

Usage Examples

Example 1: Light Switch with Scene Control

Use Case: Normal switch operation, but double-press for bright scene

Configuration:

  • Trigger Entity: light.bedroom
  • Immediate Single Press: Enabled
  • Single Press Action: Leave empty (light toggles naturally)
  • Double Press Action:
  - choose:
      - conditions:
          - condition: sun
            after: sunset
        sequence:
          - service: scene.turn_on
            target:
              entity_id: scene.bedroom_bright_night
      - conditions:
          - condition: sun
            before: sunset
        sequence:
          - service: scene.turn_on
            target:
              entity_id: scene.bedroom_bright_day

Example 2: Button with Escalating Actions

Use Case: Button that does more based on number of presses

Configuration:

  • Trigger Entity: binary_sensor.my_button
  • Immediate Single Press: Disabled (wait to see if multi-press)
  • Single Press Action: Turn on TV
  • Double Press Action: Turn on TV + soundbar + dim lights
  • Triple Press Action: Full movie mode (TV + soundbar + lights off + close blinds)
  • Quad Press Action: Party mode

Example 3: Bathroom Light with Time-Based Logic

Configuration:

  • Trigger Entity: light.bathroom
  • Immediate Single Press: Enabled
  • Triple Press Action:
  - choose:
      - conditions:
          - condition: time
            after: "22:00:00"
            before: "06:00:00"
        sequence:
          - service: light.turn_on
            target:
              entity_id: light.bathroom
            data:
              brightness_pct: 10
              color_temp: 454
      default:
        - service: light.turn_on
          target:
            entity_id: light.bathroom
          data:
            brightness_pct: 100

Updates

To get the latest version of this blueprint:

  1. Go to Settings → Automations & Scenes → Blueprints
  2. Find "Multi-Press Action" in your list
  3. Click the menu (three dots)
  4. Select "Re-import Blueprint"
  5. Your existing automations will automatically use the updated version

Changelog

v1.0.0 (2025-10-25)

  • Initial release
  • Support for single, double, triple, and quad press actions
  • Configurable time window
  • Optional immediate single-press mode
  • Full action sequence support with conditions

Tips

  • Immediate mode (default): Best for switches that control things directly (like lights). No delay on single press.
  • Delayed mode: Best for buttons that only trigger automations. Waits to see if you're doing a multi-press.
  • Time window: Start with 1.5s. Increase if you have trouble with multi-press detection, decrease for faster response.
  • Action complexity: Each action input supports full Home Assistant action sequences - use conditions, choose blocks, multiple services, etc.

Troubleshooting

Multi-press not detecting:

  • Increase the time window
  • Check that your entity is actually changing state rapidly
  • Look at Developer Tools → Events to watch state_changed events

Single press delayed even in immediate mode:

  • Make sure "Execute Single Press Immediately" is enabled
  • Check that your single press action isn't empty (unless you want the natural entity behavior)

Automation not working:

  • Check the automation trace (Settings → Automations → your automation → ⋮ → Traces)
  • Verify your trigger entity is the correct one
  • Test with simple actions first (like notifications)

Support

Found a bug or have a feature request? Open an issue on the repository!

License

Feel free to use, modify, and share this blueprint!

Description
No description provided
Readme 193 KiB
Languages
Markdown 100%