Migrate domoticz wasmachine script

Hi, ik like to make my wasmachine script from domoticz in Hass.
When the power change from 0.6 to higher it is running…
Sometimes the usage drops to 0.6 but after minitues it grows again…
But after sat 5 minutes on 0.6 it is read…

I made my first attempt self, but i know this isnt ok, need some help!
To complex for a fresh new HASS user :slight_smile:

alias: wasmachine_waarde
description: ""
trigger:
  - platform: state
    entity_id:
      - sensor.wasmachine_power
condition: null
action:
  - choose:
      - conditions:
          - condition: numeric_state
            entity_id: sensor.wasmachine_power
            above: 0.5
        sequence:
          - service: input_text.set_value
            data:
              value: Draait
            target:
              entity_id: input_text.wasmachine_status
      - conditions:
          - condition: numeric_state
            entity_id: sensor.wasmachine_power
            below: 0.5
          - condition: state
            entity_id: input_text.wasmachine_status
            state: Draait
        sequence:
          - service: input_text.set_value
            data:
              value: Lager
            target:
              entity_id: input_text.wasmachine_status
      - conditions:
          - condition: numeric_state
            entity_id: sensor.wasmachine_power
            below: 0.5
          - condition: state
            entity_id: input_text.wasmachine_status
            state: Lager
            for:
              minutes: 5
        sequence:
          - service: input_text.set_value
            data:
              value: Klaar
            target:
              entity_id: input_text.wasmachine_status
type or paste code here

Made my v2 and thats look more promising…

  - platform: template
    sensors:
      wasklaar:
        friendly_name: "Was klaar"
        value_template: "{{ (states('sensor.wasmachine_power')|float(2) < 2) }}"

alias: wasmachine_aanuit
description: ""
trigger:
  - platform: state
    entity_id:
      - switch.wasmachine
condition: []
action:
  - choose:
      - conditions:
          - condition: state
            entity_id: switch.wasmachine
            state: "on"
        sequence:
          - service: input_text.set_value
            data:
              value: Stp aan
            target:
              entity_id: input_text.wasmachine_status
          - service: python_script.set_state
            data:
              entity_id: binary_sensor.wasklaar
              state: "off"
      - conditions:
          - condition: state
            entity_id: switch.wasmachine
            state: "off"
        sequence:
          - service: input_text.set_value
            data:
              value: Stp uit
            target:
              entity_id: input_text.wasmachine_status
          - service: python_script.set_state
            data:
              entity_id: binary_sensor.wasklaar
              state: "off"

alias: wasmachine_waarde
description: ""
trigger:
  - platform: state
    entity_id:
      - sensor.wasmachine_power
condition: null
action:
  - choose:
      - conditions:
          - condition: numeric_state
            entity_id: sensor.wasmachine_power
            below: 1.7
          - condition: state
            state: "off"
            entity_id: binary_sensor.wasklaar
        sequence:
          - service: input_text.set_value
            data:
              value: Stp wasmachine aan
            target:
              entity_id: input_text.wasmachine_status
      - conditions:
          - condition: numeric_state
            entity_id: sensor.wasmachine_power
            above: 1.6
            below: 2
          - condition: state
            state: "off"
            entity_id: binary_sensor.wasklaar
        sequence:
          - service: input_text.set_value
            data:
              value: Led wasmachine aan
            target:
              entity_id: input_text.wasmachine_status
      - conditions:
          - condition: numeric_state
            entity_id: sensor.wasmachine_power
            above: 2
        sequence:
          - service: input_text.set_value
            data:
              value: Was draait
            target:
              entity_id: input_text.wasmachine_status

alias: wasmachine_waardeklaar
description: ""
trigger:
  - platform: state
    entity_id:
      - binary_sensor.wasklaar
    for:
      hours: 0
      minutes: 5
      seconds: 0
    to: "on"
action:
  - service: input_text.set_value
    data:
      value: Klaar
    target:
      entity_id: input_text.wasmachine_status