Austin Brunkhorst d2c328c817
Add snooz transition services (#25432)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Austin Brunkhorst <austin@xbox.com>
2023-01-03 18:14:23 +01:00

2.9 KiB

title description ha_category ha_bluetooth ha_release ha_iot_class ha_codeowners ha_domain ha_config_flow ha_platforms ha_integration_type
Snooz Instructions on how to integrate SNOOZ devices into Home Assistant.
Fan
true 2022.11 Local Push
@AustinBrunkhorst
snooz true
fan
integration

Integrates SNOOZ devices into Home Assistant.

{% include integrations/config_flow.md %}

The SNOOZ integration will automatically discover devices once the Bluetooth integration is enabled and functional.

Supported devices

Setup

Once a device is discovered, it needs to be put into pairing mode to complete setup.

Entering pairing mode

  1. Ensure the device is not connected to a mobile app or any other Bluetooth controller.
  2. Hold your finger on the power button until all buttons begin pulsing on and off (~ 5 seconds).

Top down view of a SNOOZ White Noise Machine, highlighting the power button.

Platforms

Fan

Devices are exposed as Fan entities with a persistent connection to the device.

Fan speed percentage is mapped to the device volume level.

Speed percentages less than 10 have no effect - they all map to a value of 1 on the device.

Services

Service snooz.transition_on

Transition the volume level over the specified duration. If the device is powered off, the transition will start at the lowest volume level.

{% my developer_call_service badge service="snooz.transition_on" %}

Service data attribute Optional Description
duration yes Number of seconds to transition to target volume.
volume yes Percentage volume level. If not specified, the volume on the device is used.

Automation example

automation:
  - trigger:
      - platform: time
        at: "04:20:00"
    action:
      - service: snooz.transition_on
        target:
          entity_id: fan.snooz_abcd
        data:
          volume: 33
          duration: 120

Service snooz.transition_off

Transition the volume level to the lowest setting over the specified duration, then power off the device.

Once the transition completes, the volume level is restored to the value before the transition started.

{% my developer_call_service badge service="snooz.transition_off" %}

Service data attribute Optional Description
duration yes Number of seconds to complete the transition.

Automation example

automation:
  - trigger:
      - platform: time
        at: "16:20:00"
    action:
      - service: snooz.transition_off
        target:
          entity_id: fan.snooz_abcd
        data:
          duration: 120