state_goto.py 383 B

1234567891011121314151617
  1. @service
  2. def state_goto_all_on():
  3. log.info(f"********* ALL ON ***********")
  4. switch.turn_on(entity_id='switch.group_button_all')
  5. light.turn_on(entity_id='light.tradfri_bulb')
  6. @service
  7. def state_goto_all_off():
  8. log.info(f"********* ALL OFF ***********")
  9. switch.turn_off(entity_id='switch.group_button_all')
  10. light.turn_off(entity_id='light.tradfri_bulb')