yandex_smart_home

repository·dev·Indexed 22 days ago

https://github.com/dext0r/yandex_smart_home

A Home Assistant integration that bridges local devices to the Yandex Smart Home and VK Smart Home ecosystems. It enables control of Home Assistant devices via Yandex's Alice voice assistant (including Yandex Stations and TVs) and VK's Marusia assistant (including VK Capsule speakers). The integration supports custom capabilities via entity_config, allowing users to define custom modes, toggles, and ranges for devices. Requires Home Assistant version 2025.12 or newer.

Tokens
40.7K
Snippets
78
Records
143
Agent score
76%

What's inside yandex_smart_home

  1. Overview of Yandex Smart Home for Home Assistant

    dev

    The Yandex Smart Home component allows you to expose devices from Home Assistant to the Yandex Smart Home platform. This enables control via any device with Alice, including:

    • Yandex Stations (smart speakers) and Televisions.
    • The Дом с Алисой (Home with Alice) mobile application.

    Since version 1.0.0, the component also supports the VK Smart Home platform, allowing control via Marusia devices, including:

    • VK Capsule speakers.
    • The Маруся mobile application.
    • The Умный дом с Марусей web application.

    Requirements:

    • Home Assistant version 2025.12 or newer.
  2. Overview of the Yandex Smart Home component

    dev

    The Yandex Smart Home component for Home Assistant allows you to expose your Home Assistant devices to the Yandex Smart Home platform and the VK Smart Home platform.

    Once configured, you can control your Home Assistant devices using:

    • Yandex (Alisa): Yandex Station smart speakers and the 'Дом с Алисой' mobile app.
    • VK (Marusia): VK Capsule speakers, the 'Маруся' mobile app, and the 'Умный дом с Марусей' web app.

    Requirements:

    • Home Assistant version 2025.12 or newer.
  3. Configure dishwasher modes and custom mode selection

    dev

    Dishwashers in Yandex Smart Home use a modes mapping to translate Yandex commands into appliance-specific program names.

    To make mode switching functional, you must implement custom_modes. This requires:

    1. state_entity_id: The entity that reports the currently active program (e.g., a sensor or select entity).
    2. set_mode: An action block that executes when a user selects a mode. This typically uses select.select_option with a template option: "{{ mode }}" to pass the requested mode name to the appliance's program selector.

    Example mapping for dishwashing modes:

    • intensive
    • fast
    • auto
    • eco
    • express
    • glass
    • smart
    • quiet
    • pre_rinse
          modes:
            dishwashing:
              intensive: "Dishcare.Dishwasher.Program.Intensiv70"
              eco: "Dishcare.Dishwasher.Program.Eco50"
          custom_modes:
            dishwashing:
              state_entity_id: select.013100518886064003_programs
              set_mode:
                action: select.select_option
                entity_id: select.013100518886064003_programs
                data:
                  option: "{{ mode }}"
  4. Special features for RGBW/RGBWW devices

    dev

    Lights with dedicated white LEDs (RGBW/RGBWW) gain two additional capabilities via Yandex:

    1. Volume (Громкость): Controls the brightness of the white LEDs (Яркость белого for RGBW or Яркость холодного белого for RGBWW).
    2. Opening (Открытие): Controls the brightness of the warm white LEDs (Яркость теплого белого for RGBWW).
  5. Value conversion for Yandex Smart Home sensors

    dev

    The component automatically converts sensor values from Home Assistant (HA) units to the fixed units required by Yandex Smart Home (УДЯ).

    If the HA unit is already one of the supported Yandex units, no conversion is performed (e.g., if pressure is in bars in HA, it is passed as bars to Yandex).

    Note: Some sensors are passed through "as is" even if units mismatch (e.g., VOC Index in EFEKTA iAQ3 sensors).

  6. Compare Yandex Smart Home connection types

    dev

    Choose the connection type that best fits your security requirements, network configuration, and latency tolerance.

    Connection Type Comparison

    | Type | Pros | Cons | | :--- | :--- | : | | Cloud (Yaha Cloud) | • Easy to set up<br>• Lower latency if you are far from Moscow (maintains an open connection) | • Dependent on the availability of the intermediate cloud server<br>• Privacy: devices are visible to the cloud server owner (though traffic is encrypted and data is anonymized) | | Cloud Plus | • Does not require internet access or "Home Sharing" to connect an additional Home Assistant instance | • Same pros/cons as standard Cloud<br>• Relatively complex setup<br>• In Marusya, scenarios based on device/sensor states will not work | | Direct | • No dependency on an intermediate cloud server<br>• Privacy: no one except Yandex can control your devices | • Requires constant internet access to Home Assistant (requires DDNS, certificate management, etc.)<br>• Complex setup<br>• Higher latency for commands if you are far from Moscow (each request requires a new TLS handshake)<br>• In Marusya, scenarios based on device/sensor states will not work |

    !!! warning "Using any cloud service (whether Yandex Smart Home or Yaha Cloud) grants that service the right to control all supported devices in Home Assistant."

  7. Configure device modes and custom actions

    dev

    Device modes allow you to select a working mode in Yandex Smart Home (УДЯ) that triggers a specific action in Home Assistant.

    To use custom modes, you must define them via the custom_modes dictionary. Note that for custom modes, automatic mapping between Yandex values and Home Assistant values is not performed; you must manually define these correspondences using the modes key.

    Key configuration components:

    • modes: Maps Yandex mode names to specific Home Assistant states or attributes.
    • custom_modes: Defines the logic to execute when a mode is changed.
    • set_mode: The action to call when a mode is selected. It accepts a mode variable which represents the value on the Home Assistant side.
    yandex_smart_home:
      entity_config:
        vacuum.xiaomi_mop:
          modes:
            work_speed:  # mapping between Yandex modes and HA states
              eco: 'Low'
              medium: 'Med'
              max: 'High'
          custom_modes:
            work_speed:
              state_entity_id: vacuum.xiaomi_mop
              state_attribute: water_level
              set_mode:
                action: xiaomi_vacuum.set_water_level
                entity_id: vacuum.xiaomi_mop
                data:
                  water_level: '{{ mode }}'
  8. Define the state of custom capabilities

    dev

    To ensure the current state of a capability is reflected in the "Alice Home" app and can be answered by Alice, you must define a state source. While omitting a state source won't prevent control, the device state will not be reported correctly.

    Ways to define the state source:

    1. state_entity_id: The entity whose state represents the capability state.
    2. state_entity_id + state_attribute: The value of a specific attribute within the state_entity_id entity.
    3. state_template: A Jinja2 template that evaluates to the capability state.

    Note: state_entity_id can be omitted if it is the same entity being configured, but it is recommended to specify it explicitly to avoid confusion.

    # Example: Using state_entity_id
    yandex_smart_home:
      entity_config:
        fan.air_purifier:
          custom_toggles:
            controls_locked:
              state_entity_id: switch.air_purifier_child_lock
              turn_on: ...
              turn_off: ...
    
    # Example: Using state_entity_id + state_attribute
    yandex_smart_home:
      entity_config:
        vacuum.mop:
          modes:
            work_speed:
              eco: 'V1'
              medium: 'V2'
          custom_modes:
            work_speed:
              state_entity_id: vacuum.mop
              state_attribute: water_level
              set_mode: ...
    
    # Example: Using state_template
    yandex_smart_home:
      entity_config:
        water_heater.kettle:
          custom_toggles:
            mute:
              state_template: '{{ is_state("switch.kettle_beeper", "off") }}'
              turn_on: ...
              turn_off: ...
  9. How to filter objects for Yandex Smart Home

    dev

    By default, no objects are passed to Yandex Smart Home (УДЯ). You must select which objects (devices) should be exposed. You can choose one of three mutually exclusive methods for selecting objects. You cannot use different methods simultaneously.

    Selection Methods

    1. Via Integration Settings (GUI): Select specific entities directly through the integration's user interface.
    2. Via Object Labels: Assign specific Home Assistant labels to entities you want to expose. The integration will then automatically pass all entities with those labels.
    3. Via YAML Configuration: Use a filter block in your YAML configuration to include or exclude entities based on domains, specific entity IDs, or globs.

    Important Rules for Device Management

    • Manual Deletion Required: If you stop exposing an object in Home Assistant, you must manually delete it from Yandex Smart Home. Leaving unexposed devices in Yandex can cause incorrect behavior and errors when querying state.
    • To remove all devices: Unlink the skill (manufacturer) in the Yandex settings.
    • Marusia (Voice Assistant): Only displays devices that are currently selected for transmission.
  10. Understand why the skill is named Yaha Cloud

    dev

    When using a cloud connection in Yandex (УДЯ), you will see a skill named Yaha Cloud instead of "Home Assistant".

    This is because "Home Assistant" is a registered trademark, and Alice skill catalog rules only allow the trademark owner (Nabu Casa) to use that specific name. Yaha is a portmanteau of YAndex + HomeAssistant.

  11. How the Yandex Smart Home component works

    dev

    The component maps Home Assistant Entities (Objects) to Yandex Smart Home (YSH) Devices.

    Key distinction: Home Assistant Devices are not used to create YSH devices. Instead, HA Devices are only used to display the model in YSH and to determine the assigned room. A single YSH device can be composed of multiple Home Assistant entities (for example, a multi-sensor device).