klatremis/esphome-for-deye

Set value for ''Max grid shave power'' from ESP32

Vali7719 opened this issue · 0 comments

Hi.
First of all I would like to thank you for your work - it really helped me to make some nice automations in Home Assistant.

I'm trying to change Max grid shave power directly from ESPHome on ESP32 without Home Assistant (where with automations this works without any issues).

My simple code is:
`time:

  • platform: homeassistant
    id: homeassistant_time

    on_time:

    • seconds: 0
      minutes: 30
      hours: 7
      days_of_week: MON-FRI
      then:
      lambda: |-
      id(sun12k_max_grid_shave_power).publish_state(8000);
    • seconds: 0
      minutes: 50
      hours: 3
      days_of_week: MON-FRI
      then:
      lambda: |-
      id(sun12k_max_grid_shave_power).publish_state(10000);`

The problem is that value 8000 (or 10000 at 3hr50min) is set for only couple of second and will then be turned back to value set before that time (set on Deye like lets say 12000).

How can I set value that remain same until at different time different value is set?
Thank you and best regards.
Bogdan