Wyze sensor as automation trigger

I have a Wyze motion sensor which definitely works because I can see it’s state in the Lovelace UI (using the Entity card).
However, I have set it as a trigger for an automation and even though the state is showing as detecting motion in the Lovelace UI, the automation will not trigger. My YAML for the automation is as follows:

alias: Hall light-automatic
description: >-
  Turn hall light on and off depending on whether motion is detected between
  sunset and sunrise
trigger:
  - platform: state
    entity_id: 'binary_sensor.wyzesense_779232e3
    to: 'on'
condition:
  - condition: sun
    before: sunrise
    after: sunset
action:
  - type: turn_on
    device_id: d62ab7c21b1dcb6c1ed9a50758688378
    entity_id: light.04232101cc50e3ec05ae
    domain: light
  - delay:
      hours: 0
      minutes: 0
      seconds: 15
      milliseconds: 0
  - type: turn_off
    device_id: d62ab7c21b1dcb6c1ed9a50758688378
    entity_id: light.04232101cc50e3ec05ae
    domain: light
mode: single

Even if I remove the condition about the sun, it still fails to trigger. I can execute the actions for the automation manually.
I see other people have similar problems and the repository is no longer maintained so I would appreciate any ideas.

I believe your entity_id: is formatted incorrectly. You have an open ` but no close. On mine I have neither and it works fine.

 trigger:
  - entity_id: binary_sensor.wyzesense_779324f0
    from: 'off'
    platform: state
    to: 'on'

As Bill said, you need to remove the single quote at the beginning of the wntity_id in the trigger.

Your condition doesn’t work because it’s never before sunrise and after sunset at the same time. The docs explicitely say that you need to separate the conditions.

From the docs:

condition:
  condition: or
  conditions:
    - condition: sun
      after: sunset
    - condition: sun
      before: sunrise

Thank you both @bschatzow and @Burningstone. You have solved it! (that is a relief because I thought I may not be able to use the Wyze sensors with HA at all). I am not sure where that first quote came from as I used the visual editor but perhaps I did a typo later. I have also set the conditions for before sunrise and after sunset separately. I can’t properly test it until tonight but it looks good.