Dyson fan off when auto_mode activated

Dear community,
I am finding something weird with Dyson integration.
When I enable the auto_mode on the official Dyson app or with the remote controller, the button entity card of fan.dyson switches off. Is it normal?
Is there a way to easily control auto mode and night mode on lovelace UI?
Thanks!

Create an entity-button card with a tap action that executes the service cal to set the night mode/auto mode, something like this to turn on the auto mode:

tap_action:
  action: call-service
  service: fan.set_auto_mode
  service_data:
    entity_id: fan.dyson_fan
    auto_mode: true

Thank you! How to turn it on/off with the same button?

Either you use the hold_action that sends the turn off service call or create a template switch and use this in your lovelace card.

Ok sounds good, thank you!!

Did anyone find why?

Putting this here so I can share it and ( more importantly :wink: ) so I can find it if necessary…

~ $ cd config
config $ grep switch configuration.yaml 
switch: !include_dir_merge_list switches/
config $ cat switches/template_service_dyson_set_auto_mode.yaml
- platform: template
  switches:
    template_service_dyson_set_auto_mode_1:
      friendly_name: Living Room Fan Auto Mode
      value_template: "{{ is_state_attr('fan.living_room', 'auto_mode', true) }}"
      turn_on:
        service: dyson.set_auto_mode
        data:
          entity_id: fan.living_room
          auto_mode: true
      turn_off:
        service: dyson.set_auto_mode
        data:
          entity_id: fan.living_room
          auto_mode: false
config $ 

When I try to create an entity card as below

tap_action:
  action: call-service
  service: fan.set_auto_mode
  service_data:
    entity_id: fan.dyson_fan
    auto_mode: true

It says the fan.set_auto_mode service is not found. I cannot see this under developer tools - call service either.

Do i need to define it somewhere? if so where?