Issues with Yeelight using GoogleHome or HomeAssistant automation

Hi everyone,

I’m facing some issues with automating a Yeelight.light.color4 bulb and a Shelly1Plus switch using Google Home on Home Assistant 13.2.

Setup:

  • Yeelight bulb: Directly connected to the power supply, always online.
  • Shelly1Plus: Wired to control the physical switch.
  • Home Assistant: Version 13.2
  • Automation: I’ve created two automations and two scripts (attached) to sync the state between the bulb and the switch.

Problem: When I control the Yeelight bulb using Google Home or the Yeelight app, the automations don’t trigger, and the Shelly1Plus state remains unchanged. However, if I control the Shelly1Plus directly through Google Home or the Shelly app, everything works fine.

I’ve also tried creating automations directly in Google Home, but I’m still facing the same issue.

  • Any logs is present on Hassio when turn on the light by GoogleHome or YeelightAPP

Here are my automations and scripts:

alias: Sync Light with Shelly

description: Sincronizza lo stato della lampadina con lo stato dello Shelly

triggers:
Automazione 1
  - entity_id:

      - switch.shellyplus1_toggle_boa

    trigger: state

conditions: []

actions:

  - action: script.sync_light_with_shelly

    data: {}



2 automazione 

alias: Sync Shelly with Light

description: Sincronizza lo stato dello Shelly con lo stato della lampadina

triggers:

  - entity_id:

      - light.yeelight_boa

    trigger: state

    attribute: brightness

conditions: []

actions:

  - action: script.sync_shelly_with_light

    data: {}



1 script

alias: Sync Light with Shelly

sequence:

  - choose:

      - conditions:

          - condition: state

            entity_id: switch.shellyplus1_toggle_boa

            state: "on"

        sequence:

          - target:

              entity_id: light.yeelight_boa

            action: light.turn_on

            data: {}

      - conditions:

          - condition: state

            entity_id: switch.shellyplus1_toggle_boa

            state: "off"

        sequence:

          - target:

              entity_id: light.yeelight_boa

            action: light.turn_off

            data: {}



2script

alias: Sync Shelly with Light

sequence:

  - choose:

      - conditions:

          - condition: state

            entity_id: light.yeelight_boa

            state: "on"

        sequence:

          - target:

              entity_id: switch.shellyplus1_toggle_boa

            action: switch.turn_on

            data: {}

      - conditions:

          - condition: state

            entity_id: light.yeelight_boa

            state: "off"

        sequence:

          - target:

              entity_id: switch.shellyplus1_toggle_boa

            action: switch.turn_off

            data: {}

I’ve followed this guide for the initial setup: [Link to the guide] But I’ve created my own automations instead of using the ones from the guide.

Any help or suggestions would be greatly appreciated!