Running Devices When Energy is Cheaper and Greener

Yes, that is what I plan to do. Sadly most of the Templates I found didn’t work due to Syntax Changes in HA, but I will get there eventually. I am going to test my current Automation for another day or so and play with some variables like the “Charge from Grid” and “Forcible Charge” options for my Inverter.

How have you found the DETA outdoor plugs? That was what I was looking at installing for my pool pump and heater.

Also with the move the EMHASS did you add any energy monitors to dynamically get the deferable load values or have you found they are pretty static and can just be approximated with a nominal values?

The Deta sockets have been pretty solid. They were a bit of a pain to setup with localtuya but I haven’t been able to find any other outdoor rated sockets. Sometimes the wifi is a little fiddle as the pool equipment is away from the house.

My pool heater is a big three phase heat pump and I was worried about how I could get a big enough relay to switch. In the end the heat pump has a flow switch that turns on and off with a smaller flow pump that could plug into a 10A GPO, I use the other socket for the 10A filter pump.

For the three phase heat pump I use a Shelly 3EM with CT clamps for power monitoring. The 2x 10A sockets report combined power via local tuya. So I can monitor the pumps and heat pump separately and control as two different loads in EMHASS. I set the run hours for the heat pump to the hours of extremely_low (< 5¢/ kWh) prices for the day. I set the filter pump to run for a certain daily energy or a function of the solar pv forecast for the day.

    - name: def_total_hours_pool_filter
      state: >-
        {{

          (is_state('automation.p_deferable0_automation', 'on') | int(0)) *
          (
            max(
              (4 - states('sensor.pool_daily_energy') | int(0) / 1000) | int(0),
              (states('sensor.solcast_forecast_today') | float(0) / states('sensor.solcast_peak_forecast_today') | float(0)*1000)
            )|int(0) 
          )
        }}


    - name: def_total_hours_pool_heatpump
      state: "{{is_state('automation.p_deferable1_automation','on')|int
               * max(0,((state_attr('sensor.amber_feed_in_forecast', 'forecasts')|selectattr('descriptor','eq','extremely_low')|list|count)/2)
                        )|int(0)}}"

Some details on how I have configued the Power Flow Plus Card

type: custom:power-flow-card-plus
entities:
  battery:
    entity: sensor.apf_battery_entity
    state_of_charge: sensor.gateway_battery
    invert_state: true
    color_icon: true
    color_circle: true
    display_state: one_way
    state_of_charge_unit_white_space: false
    color_state_of_charge_value: true
    display_zero_tolerance: 100
  grid:
    entity: sensor.apf_grid_entity
    invert_state: true
    display_zero_tolerance: 150
    display_state: one_way
    color_icon: true
    color_circle: true
    use_metadata: false
    secondary_info:
      entity: sensor.solaredge_imported_energy
      unit_of_measurement: kWh
      icon: ''
      color_value: false
      unit_white_space: true
      display_zero: true
  solar:
    entity: sensor.apf_generation_entity
    display_zero_state: false
    color_value: true
    color_icon: true
    invert_state: false
    use_metadata: false
    secondary_info:
      display_zero: true
      entity: sensor.apf_generation_entity_energy_daily
      unit_of_measurement: kWh
      color_value: true
  home:
    entity: sensor.apf_real_house_load
    color_icon: true
    color_value: true
    secondary_info:
      entity: sensor.apf_house_entity_energy_daily
      unit_of_measurement: kWh
      color_value: true
      display_zero: true
    override_state: false
  individual2:
    entity: sensor.ev_charging
    secondary_info:
      entity: sensor.m3p_battery
      unit_of_measurement: '%'
      color_value: true
      template: >-
        {{states('sensor.m3p_battery') + '% ' + states('sensor.my_battery')
        +'%'}}
    display_zero: true
    color_value: true
    color_icon: true
    display_zero_state: false
    calculate_flow_rate: true
    display_zero_tolerance: 50
    show_direction: false
    inverted_animation: false
    name: EV x2
    icon: mdi:car-2-plus
    color:
      - 79
      - 158
      - 79
  individual1:
    entity: sensor.hvac_power
    name: HVAC
    icon: mdi:hvac
    secondary_info:
      unit_of_measurement: kWh
      template: ''
      color_value: true
      unit_white_space: true
      decimals: 0
      display_zero: true
      display_zero_tolerance: 5
      entity: sensor.heating_cooling_daily
    color_icon: true
    color_value: true
    color:
      - 64
      - 121
      - 255
    display_zero: true
    display_zero_state: false
    calculate_flow_rate: false
    inverted_animation: false
    use_metadata: false
    display_zero_tolerance: 200
  fossil_fuel_percentage:
    display_zero: false
    color_icon: true
    display_zero_state: false
    display_zero_tolerance: 1
    color_value: true
    use_metadata: false
clickable_entities: true
display_zero_lines:
  mode: hide
  transparency: 50
  grey_color:
    - 189
    - 189
    - 189
use_new_flow_rate_model: true
w_decimals: 0
kw_decimals: 1
transparency_zero_lines: 0
min_expected_power: 1000
max_expected_power: 10000
max_flow_rate: 10
min_flow_rate: 1

Some details on how I have configured the Sankey Chart Card

height: 200
unit_prefix: M
round: 1
min_box_height: 3
min_box_distance: 5
show_states: true
show_units: true
sections:
  - entities:
      - type: entity
        children:
          - sensor.apf_solar2batt_energy_monthly
          - sensor.apf_solar2house_energy_monthly
          - sensor.apf_solar2grid_energy_monthly
        entity_id: sensor.apf_generation_entity_energy_monthly
        color: var(--warning-color)
        name: Solar
      - type: remaining_child_state
        children:
          - sensor.apf_grid2batt_energy_monthly
          - sensor.apf_grid2house_energy_monthly
        entity_id: grid
        color: var(--error-color)
        name: Grid
  - entities:
      - type: entity
        children:
          - battery
        entity_id: sensor.apf_solar2batt_energy_monthly
        color: var(--warning-color)
        name: Solar2Batt
      - type: entity
        children:
          - battery
        entity_id: sensor.apf_grid2batt_energy_monthly
        color: var(--error-color)
        name: Grid2Batt
      - type: entity
        children:
          - sensor.apf_grid_export_energy_monthly
        entity_id: sensor.apf_solar2grid_energy_monthly
        color: var(--warning-color)
        name: Solar2Grid
      - type: entity
        children:
          - sensor.apf_house_entity_energy_monthly
        entity_id: sensor.apf_solar2house_energy_monthly
        color: var(--warning-color)
        name: Solar2House
      - type: entity
        children:
          - sensor.apf_house_entity_energy_monthly
        entity_id: sensor.apf_grid2house_energy_monthly
        color: var(--error-color)
        name: Grid2House
  - entities:
      - type: remaining_parent_state
        children:
          - sensor.apf_batt2house_energy_monthly
          - sensor.apf_batt2grid_energy_monthly
        entity_id: battery
        color: var(--success-color)
        name: Battery Charging
  - entities:
      - type: entity
        children:
          - sensor.apf_house_entity_energy_monthly
        entity_id: sensor.apf_batt2house_energy_monthly
        color: var(--success-color)
        name: Batt2House
      - type: entity
        children:
          - sensor.apf_grid_export_energy_monthly
        entity_id: sensor.apf_batt2grid_energy_monthly
        color: var(--success-color)
        name: Batt2Grid
  - entities:
      - type: entity
        children: []
        entity_id: sensor.apf_house_entity_energy_monthly
        name: House
      - entity_id: sensor.apf_grid_export_energy_monthly
        color: var(--error-color)
        name: Grid Export
type: custom:sankey-chart
show_names: true
wide: true
min_state: 0
energy_date_selection: false
title: Energy - Monthy
2 Likes