Rheem Econet Automation

Hi

I saw someone created the automation below but i cant figure out how to do it myself . Could someone help with the step by step instructions on how to get this to work. wasted so much time on it already.

“I created an automation that changes the mode to High Demand when the “hot water availability” drops below 10% during morning showers, and then switches back to Heat Pump when it gets above 39% (EcoNet only reports 0, 10, 40, and 100%)”

id: ‘1707947823847’
alias: 45 Left Water below 10% High Demand
description: ‘’
trigger:

  • platform: state
    entity_id:
    • water_heater.45_left_heat_pump_water_heater
      attribute: operation_mode
      from: heat_pump
      condition:
  • type: is_value
    condition: device
    device_id: f5a44c4680a79a2df8ef4f2a93f34e3a
    entity_id: 22ecf40f98e6af2e1f83b8fdc2c691d4
    domain: sensor
    below: 20
    action:
  • service: water_heater.set_operation_mode
    metadata: {}
    data:
    operation_mode: High Demand
    target:
    entity_id:
    - water_heater.45_left_heat_pump_water_heater
    mode: single