Dyson Ventilator - Night Mode

Hello all,

I have read about some struggles with the integrated Dyson night mode activation but none seem to answer my challenge.

I have a dyson ventilator, works as it should and I exposed it to Homekit, as I wanted.

Now I’d like to add an automation, that says when the ventilator turns on (i.e. via press in Homekit), Home Assistant should turn on Night Mode, as this is not a setting I can set via Homekit.

I have used the interface as well as the editor and neither bring me to a working solution. Here below what I have in code:

- id: '1588509558524'
  alias: Dyson Nightmode
  description: ''
  trigger:
  - entity_id: fan.bedroom
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - service: dyson.set_night_mode
    data:
      entity_id: fan.bedroom
      night_mode: true

The log gives me the following error whenever it is executed (it executed exactly as planned, so the error is in the action):

Log Details (ERROR)

Logger: homeassistant.components.automation
Source: helpers/script.py:798 
Integration: Automation ([documentation](https://www.home-assistant.io/integrations/automation), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+automation%22)) 
First occurred: 5:35:53 PM (3 occurrences) 
Last logged: 7:01:45 PM

Dyson Nightmode: Error executing script. Invalid data for call_service at pos 1: value should be a string for dictionary value @ data['entity_id']

Thank you for any and all help;
Sebastian

Hi Sebastian, were you able to resolve this issue, if so, how did you do it?
Thanks, Steve