jmcollin78 / solar_optimizer

The Solar Optimizer integration for Home Assistant starts and stops your equipments depending on the Solar net production
MIT License
53 stars 10 forks source link

Day without enough solar production #37

Open hatch01 opened 3 weeks ago

hatch01 commented 3 weeks ago

Is your feature request related to a problem? Please describe. If we are on a cloudy day, the water eater would not be turned on in the day and I will get cold water.

Describe the solution you'd like Add a parameter "minimum enabled duration per day" for the entities.

Describe alternatives you've considered I could maybe work around by just measuring the duration in the evening and enable it then, but this will not be optimized with the solar production.

MrBLJ commented 3 weeks ago

Workaround for Optimizing Solar Excess for Water Heating

Disclaimer: I primarily use my solar excess to charge my cars, so the water-heating part of my setup isn't fully optimized yet.

Method

Create a Sensor to Track Device Usage

You have two options:

  1. Track the Number of Hours the Device was Used
# Sensor - History stats.
sensor:
  # Heating Duration Today
  # Number of hours of heating done today.
  - platform: history_stats
    name: Heating Duration Today
    entity_id: sensor.heated_floor_status
    state: 'heating'
    type: time
    start: '{{ now().replace(hour=0).replace(minute=0).replace(second=0) }}'
    end: '{{ now() }}'
  1. Track the Power Consumption per Day
# Example configuration.yaml entry
utility_meter:
  energy:
    source: sensor.energy_in_kwh
    cycle: daily

Determine Heating Cycle Specs

On a day without solar injection, turn on your boiler and measure the time it takes to get hot water. This will give you a limit in terms of hours or kWh to use in an automation.

Create an Automation

This way, you can run solar optimizer during the day, and finish off heating during offpeak hours.

jmcollin78 commented 3 weeks ago

This is the same request as #5. I will implement this when I have time (and not for the moment).