Grocy Stock / Set washing machine active when power detected

View All Rules

alias: Grocy Stock / Set washing machine active when power detected
trigger:
  - platform: numeric_state
    entity_id: switch.gf_dinning_washing_machine_switch
    value_template: '{{ state.attributes.current_power_w }}'
    above: 10
condition:
  - condition: state
    entity_id: sensor.gf_dinning_washing_machine_status
    state: Idle
action:
  - service: input_select.select_option
    data:
      entity_id: input_select.gf_dinning_washing_machine_status
      option: Running
  - service: rest_command.grocy_consume_item
    data:
      product_id: 6
      amount: 40
  - service: rest_command.grocy_consume_item
    data:
      product_id: 7
      amount: 80

© 2020. Some rights reserved. The contents of this site is released under a Creative Commons Attribution-Share Alike license.