Myenergi Eddi Boost from Home Assistant

Hi there,

I have the Myenergi integration installed but it does not seem to allow manual boosting from the integration. I wanted to add a Boolean button to trigger an Automation. I have set up the Boolean switch and used it to trigger an automation that has its action to call a service and execute the following:

service: shell_command.eddi_boost
  data:
    myenergi_serial: 12341111
    myenergi_password: 'Mypassword01'
    eddi_serial: 14772222
    boost_mode: "{% if mode=='on' %}10{% else %}1{% endif %}"
    heater: 1
    boost_duration: "{% if mode == 'off' %}0{% else %}60{% endif %}"

Can anyone let me know how they manually boost their Eddi from HA and help me to trouble shoot the above. I have also been using the Developer tools to call the service but cant get it to work.

Thank you for any assistance.

I just set up an automation for getting boost working.2022-06-06_15-42

Config (sets up the timer and the switch state):

#number sensors (for timers)

input_number:
  eddi_boost_minutes:
    name: "Eddi Boost Time"
    min: 0
    max: 60
    step: 1
    
#Boolean sensors (for switches)

input_boolean:
  eddi_boosting:
    name: "Eddi Boosting"
    initial: off
    icon: mdi:timelapse

Automation:

alias: Eddi Boost Switch
description: ''
trigger:
  - platform: state
    entity_id:
      - input_boolean.eddi_boosting
    from: 'off'
    to: 'on'
condition: []
action:
  - service: myenergi.myenergi_eddi_boost
    data:
      target: Heater 2
      time: '{{ states("input_number.eddi_boost_minutes") | float }}'
    target:
      device_id: <mydeviceID>
  - wait_for_trigger:
      - platform: state
        entity_id:
          - sensor.myenergi_eddi_<id>_status
        from: Boosting
  - service: input_boolean.turn_off
    data: {}
    target:
      entity_id: input_boolean.eddi_boosting
mode: single

Lovelace front end:

type: entities
entities:
  - entity: input_number.eddi_boost_minutes
  - entity: input_boolean.eddi_boosting
  - entity: sensor.myenergi_eddi_<id>_status
    name: Eddi status
  - entity: sensor.myenergi_eddi_<id>_energy_used_today
    name: 'Eddi total power today '

To do:

  • Add heater 1/2 switch
  • Turn off boost when you manually set the switch to off.
1 Like

I cant get this to pass validation, I used the below in my automation.yaml file for boosting:

automation:
  id: '303427509327'
  alias: eddi_boost_switch
  description: 'Boost eddi from UI'
  trigger:
    - platform: state
      entity_id:
        - input_boolean.eddi_boosting
      from: 'off'
      to: 'on'
  condition: []
  action:
    - service: myenergi.myenergi_eddi_boost
      data:
        target: Heater 1
        time: '{{ states("input_number.eddi_boost_minutes") | float }}'
      target:
        device_id: 14771666
    - wait_for_trigger:
        - platform: state
          entity_id:
            - sensor.myenergi_eddi_14771666_status
          from: Boosting
    - service: input_boolean.turn_off
      data: {}
      target:
        entity_id: input_boolean.eddi_boosting
  mode: single

But the notification error is below, any suggestions please?

My device_id is a hash of some sort rather than the neat 9 digit number, and having gone to find it again, it looks like entity_id: select.myenergi_eddi_<id>_operating_mode

The easiest way to grab that is

Go to dev tools > services.
Select “myenergi: Boost”
Choose your entity
Go back to YAML mode (you may need to enter UI mode first)

2 Likes

THanx, I still struggeld to get the yaml working, but the automation works fine and I triggered it with the input.boolean_eddi_boost and added the time sector. my automation code done in the UI looks like this for others if interested:

service: myenergi.myenergi_eddi_boost
data:
  target: Heater 1
  time: '{{ states("input_number.eddi_boost_minutes") | float }}'
target:
  entity_id: select.myenergi_eddi_14771666_operating_mode

For others, here is my Automation copied from the UI to Boost ON the Eddi when the boolean switch, “input_boolean.eddi_boosting” is operated from the Dashboard:

alias: Eddi Boost UI Automation ON for Boost timer period
description: ''
trigger:
  - platform: state
    entity_id:
      - input_boolean.eddi_boosting
    to: 'on'
    from: 'off'
condition: []
action:
  - service: myenergi.myenergi_eddi_boost
    data:
      target: Heater 1
      time: '{{ states("input_number.eddi_boost_minutes") | int }}'
    target:
      entity_id: select.myenergi_eddi_14771666_operating_mode
  - delay: 00:{{ states("input_number.eddi_boost_minutes") | int }}:00
  - service: myenergi.myenergi_eddi_boost
    data:
      target: Heater 1
      time: 0
    target:
      entity_id: select.myenergi_eddi_14771666_operating_mode
mode: single

Note: the delay is using the number of minutes set for the Boost timer, but in the Automatino “40” minutes is read as 00:00:40 (40 seconds) so I just added the 00: before and the :00 after the boost time to give 00:40:00 or what ever boost time you set for.

And my UI AUtomation to turn off the Boost when the switch is turned off (if before the timer switches it off):

alias: Eddi Boost UI Automation OFF
description: ''
trigger:
  - platform: state
    entity_id:
      - input_boolean.eddi_boosting
    to: 'off'
    from: 'on'
condition: []
action:
  - service: myenergi.myenergi_eddi_boost
    data:
      target: Heater 1
      time: 0
    target:
      entity_id: select.myenergi_eddi_14771666_operating_mode
mode: single
1 Like

To add a heater element switch to the UI card:

Create a input_boolean.eddi_heater_element

Then make a template sensor to change its value from ‘Heater 1’ to ‘Heater 2’ when the input_boolean switch is ‘off’ or ‘on’:

template:
  sensor:
    - name: "Eddi Heater Element"
      unique_id: eddi_heater_element
      state: "{{ 'Heater 1' if is_state('input_boolean.eddi_heater_element','off') else 'Heater 2' }}"
  

To add the Myenergi Eddi card to your dashboard:

type: entities
entities:
  - entity: sensor.[YOUR WATER TEMP SENSOR HERE]
  - entity: input_number.eddi_boost_minutes
  - entity: input_boolean.eddi_boosting
  - entity: sensor.myenergi_eddi_14771666_status
    name: Eddi status
  - entity: sensor.myenergi_eddi_14771666_green_energy_today
    icon: mdi:leaf
    name: Green Energy Today
  - entity: sensor.myenergi_eddi_14771666_energy_used_today
    name: Energy Consumed Today
    icon: mdi:lightning-bolt-circle
  - entity: input_boolean.eddi_heater_element
    name: Heater 1 or 2
    secondary_info: none

Add an automation in the UI:

alias: Eddi Manual Boost UI Automation ON for Boost timer period then Turn OFF
description: ''
trigger:
  - platform: state
    entity_id:
      - input_boolean.eddi_boosting
    to: 'on'
    from: 'off'
condition: []
action:
  - service: myenergi.myenergi_eddi_boost
    data:
      target: "{{ states('sensor.eddi_heater_element') }}"
      time: '{{ states("input_number.eddi_boost_minutes") | int }}'
    target:
      entity_id: select.myenergi_eddi_14771640_operating_mode
  - delay: 00:{{ states("input_number.eddi_boost_minutes") | int }}:00
  - service: myenergi.myenergi_eddi_boost
    data:
      target: "{{ states('sensor.eddi_heater_element') }}"
      time: 0
    target:
      entity_id: select.myenergi_eddi_14771640_operating_mode
mode: single

image

2 Likes

To turn off the UI boost button when the Boost is cancelled from the Eddi App and when Max Temp Reached I used the UI Automations in HA and set up the following:

alias: Eddi cancel UI Boost if MAX temp already reached
description: ''
trigger:
  - platform: state
    entity_id:
      - input_boolean.eddi_boosting
    to: 'on'
    for:
      hours: 0
      minutes: 5
      seconds: 0
condition:
  - condition: not
    conditions:
      - condition: state
        entity_id: sensor.myenergi_eddi_14771666_status
        state: Boosting
action:
  - service: input_boolean.turn_off
    data: {}
    target:
      entity_id: input_boolean.eddi_boosting
mode: single

To send myself a Telegram message with status and water temperature:

alias: Notify when Eddi Boost turns OFF
description: >-
  Also turns OFF the input.boolean_eddi_boost on UI if manually switched OFF in
  the MyEnergi App
trigger:
  - platform: state
    entity_id:
      - sensor.myenergi_eddi_14771666_status
    to: Paused
  - platform: state
    entity_id:
      - sensor.myenergi_eddi_14771666_status
    to: 'Stopped'
  - platform: state
    entity_id:
      - sensor.myenergi_eddi_14771666_status
    to: Diverting
  - platform: state
    entity_id:
      - sensor.myenergi_eddi_14771666_status
    to: Max temp reached
  - platform: state
    entity_id:
      - sensor.myenergi_eddi_14771666_status
    from: Boosting
    to: Heating
condition:
  - condition: state
    entity_id: input_boolean.eddi_boosting
    state: 'on'
action:
  - service: telegram_bot.send_message
    data:
      message: >
        Eddi Boost hot water just turned OFF. Hot Water Temp:  {{
        states('sensor.sonoff_10011fde3e_temperature') }} °C
      title: Hot Water
  - service: input_boolean.turn_off
    data: {}
    target:
      entity_id: input_boolean.eddi_boosting
mode: single

To send Telagram message when Boost turns on and for how many minutes:

alias: Notify when Eddi BOOST turns ON
description: ''
trigger:
  - platform: state
    entity_id:
      - sensor.myenergi_eddi_14771666_status
    to: Boosting
  - platform: state
    entity_id:
      - sensor.eddi_status
    to: boosting
condition: []
action:
  - service: telegram_bot.send_message
    data:
      message: >
        Eddi Boost hot water just turned ON for {{
        states("input_number.eddi_boost_minutes") | int }} minutes. Hot Water
        Temp:  {{ states('sensor.sonoff_10011fde3e_temperature') }} °C
      title: Home
mode: single

Notify when Eddi Boost is turned on from the MyEnergi App and to turn on the UI boost switch to match:

alias: 'Notify when Eddi Boost turns ON and turn ON Input_boolean Switch in UI '
description: >-
  Turns ON the input.boolean_eddi_boost on UI if manually switched ON in the
  MyEnergi App or when Max Temp Reached
trigger:
  - platform: state
    entity_id:
      - sensor.eddi_status
    to: boosting
  - platform: state
    entity_id:
      - sensor.myenergi_eddi_14771666_status
    to: Boosting
condition: []
action:
  - service: telegram_bot.send_message
    data:
      message: >
        Eddi Boost hot water just turned ON. Hot Water Temp:  {{
        states('sensor.sonoff_10011fde3e_temperature') }} °C
      title: Home
    enabled: false
  - service: input_boolean.turn_on
    data: {}
    target:
      entity_id: input_boolean.eddi_boosting
mode: single

Finally to turn off the UI Boost switch and send Telegram message when Boost is turned off by the MyEnergi App:

alias: Turn OFF Eddi Boost Input_boolean Switch in UI
description: >-
  Also turns off the input.boolean_eddi_boost on UI if manually switched off in
  the MyEnergi App or when Max Temp Reached
trigger:
  - platform: state
    entity_id:
      - sensor.eddi_status
    to: reached
  - platform: state
    entity_id:
      - sensor.myenergi_eddi_14771666_status
    to: Max temp reached
  - platform: state
    entity_id:
      - sensor.myenergi_eddi_14771666_status
    to: Stopped
  - platform: state
    entity_id:
      - sensor.myenergi_eddi_14771666_status
    to: Paused
condition: []
action:
  - service: telegram_bot.send_message
    data:
      message: >
        Eddi Boost hot water just turned OFF. Hot Water Temp:  {{
        states('sensor.sonoff_10011fde3e_temperature') }} °C
      title: Home
    enabled: false
  - service: input_boolean.turn_off
    data: {}
    target:
      entity_id: input_boolean.eddi_boosting
mode: single
1 Like