Sonoff Bulbs No Longer working properly

Everything with my home assistant was working up until a few months ago and now since changes in the UI I have loads of issues with my configuration.

1 issue I have is automations to turn bulbs on when motion is detected trigger when the bulb is already on, causing it to flash - even though I have a condition for if the bulb is off.

Another issue is bulbs that are on report as off and when I try to change the state, I get an error object has no attribute color_temp.

Would love some help with this as I have tried loads of things to try to fix. I have deleted from HA and reimported from Sonoff, I have deleted the entity from the dashboard and readded it.

These issues ‘sound’ to me like automation issues.
Could you share some of the automations or scripts that you are using when these bulbs do these behaviors?
Color_temp function has recently completed a 6 month deprecation and is no longer a function, for instance, replaced by color_temp_kelvin. color_temp_deprecation

Please show us YAML code formatted with the </> button here in the editor so we can help you properly.

Thanks for helping. This is one of the automations

alias: Kitchen - Motion - Turn on light
description: ""
triggers:
  - type: motion
    device_id: 098353c6c3f3084fec1263f63cbe0003
    entity_id: d38ca7b98cda7f06847c358a3031c3fe
    domain: binary_sensor
    trigger: device
conditions:
  - condition: and
    conditions:
      - condition: sun
        before: sunrise
        before_offset: "60"
        after: sunset
        after_offset: "-00:60:00"
        enabled: true
      - condition: device
        type: is_off
        device_id: 876127d7aebb9d6d290ea0fc9957fa3c
        entity_id: 66a5972b89adf197be0326be3b4f869e
        domain: light
actions:
  - type: turn_on
    device_id: 876127d7aebb9d6d290ea0fc9957fa3c
    entity_id: 66a5972b89adf197be0326be3b4f869e
    domain: light
mode: single

I managed to fix this by updating the Sonoff integration in HACS