Python-kasa YAML

Hi,
Has any one used python-kasa in YAML?

From the command line python-kasa works without issue.

As an example from the command line
$ kasa --host 192.0.2.123 on
works

If I try to create an automation shown below…

alias: testing
description: “”
triggers:

  • device_id: 5ac355939f7ecfccf384b940b74fcc4c
    domain: zha
    type: remote_button_short_press
    subtype: remote_button_short_press
    trigger: device
    id: Short Press
  • device_id: 5ac355939f7ecfccf384b940b74fcc4c
    domain: zha
    type: remote_button_double_press
    subtype: remote_button_double_press
    trigger: device
    id: Double Press
    conditions:
    actions:
  • choose:
    • conditions:
      • condition: trigger
        id:
        • Short Press
          sequence:
      • event: “”
        event_data:
        command_line:
        command: kasa “–host 192.168.1.147 on”
    • conditions:
      • condition: trigger
        id:
        • Double Press
          sequence:
      • event: “”
        event_data:
        command_line:
        command: kasa “–host 192.168.1.147 off”
        mode: single

Automation does not work.

If anyone has some insight please share…

Hello mrnigelk,
Welcome to the HA forum.

Thanks for coming here and asking a question.
Would you be so kind as to adjusting the format of your code so that we can read it properly & check the YAML spacing, etc. Editing your original is the preferred way. It is very hard for us to tell what is what when the text formatter jumbles everything like that.
Use the </> button or this:
Here is an example of how to fix it from the site FAQ Page.
How to help us help you - or How to ask a good question.

Hi,

How to I delete this post?
If I try
“You don’t have permission to delete this topic. If you really want it to be deleted, submit a flag for moderator attention together with reasoning.”

Issue is fixed…