Code copy/pasta from the HA Broadlink integration guide https://www.home-assistant.io/integrations/broadlink/#learned-codes-storage-location, changed entity, script name and added commands.
# Example configuration.yaml entry for learning remote codes with Broadlink
script:
learn_dyson_fan_pwron:
sequence:
- action: remote.learn_command
target:
entity_id: remote.broadlink_rm4_pro
data:
device: fan
command:
- turn on
- turn off
- fan speed up
- fan speed down
- oscilate on or off
command_type: ir
Cannot save script with error: Message malformed: extra keys not allowed @ data['script']
I'm new, please be gentileish