Shelly Dimmer2 not entering night mode correctly (native or HA)

  • I have a Shelly Dimmer 2 in the en suite bathroom.

    I want it to dim to 30% between 00.30 and 09.00 and be 100% all other times.

    During the day it behaves as expected.

    At night, when I turn on the light, it goes to 100%. If I turn it off and on within 1 minute, it goes to 30% as expected.

    I have tried to configure this behaviour with nightmode in the shelly app and with home assistant.

    On home assistant I have tried looking for device on and tried looking for channel 1, and the behaviour is not correct.

    I have tried the shelly in detached and toggle switch mode, behaviour is not correct.

    I have tried different ways of configuring the automation (separate day and night automations, if switch in the actions), still no correct behaviour.

    The firmware is up to date.

    The light is a dimmable LED with a bypass.

    The switch is a plain 1 way toggle switch.

    I have tried factory reset a couple of times, it has been callibrated again each time.

    Is the shelly defective? Is there something else I can try??