Skip to content

how to turn_off/turn_on switches? #682

@kumarunster

Description

@kumarunster

Hi, trying to turn_off/turn_on switches like


service.call('switch', 'turn_off', entity_id='switch.sonoff_10018af19d_1')
switch.turn_off(entity_id='switch.sonoff_10018af19d_1')

but nothing works. But calling the service from home assistant developer -> actions with

action: switch.turn_off
target:
  entity_id: switch.sonoff_10018af19d_1
data: {}

works as expected. Any hint, how to achieve the same with pyscript?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions