Manual time period entry for BYD storage in Home Assistant

Hi there,

I have successfully integrated my Fronius Symo Gen24 inverter into Home Assistant via Modbus. Now I would like to charge my BYD storage manually via the Modbus interface. Since we use a variable hourly tariff, I would like to manually set a time period in the dashboard.

My idea was to use two input number fields to define a start and end time. How can I use this time period for automations? So far I have only been able to do this using a schedule tool (Schedule), but this is quite cumbersome as I always have to edit the calendar via the helper settings first.

Not this application but I’ve done this for something else.

Create two input_numbers, and use these as your start and end time.

Use these as follows:

binary_sensor:
      power_cheap_tariff:
        friendly_name: 'Power Cheap Tariff'
        value_template: "{{ states('input_number.start_time') | int(default=0) <= (now().hour | int(default=0)) < states('input_number.end_time') | int(default=0) }}"

Now use this binary sensor, as a trigger, cheap period from off to on charge, cheap period from on to off stop charging.

Sidetrack, can I ask what you used to integrate the BYD battery via modbus? Considering a small one for my GEN24, and want to control the discharge to limit it to only discharge during PEAK. Is this possible?

Thank you, that worked. I followed these (Fronius und BYD Akku über Modbus steuern) instructions and everything worked. So it should work.

Cheers, looks very comprehensive.