Automation of charge time entities not working, but do work ok on a card #41
Replies: 2 comments
-
|
👌 |
Beta Was this translation helpful? Give feedback.
-
|
Got this working......subject to full testing for all weathers. I modified the solis_modbus integration to expose a custom service (solis_modbus.set_time) that triggers the same internal update logic as my Lovelace card. Then, in automation.yaml, I call that service, passing in the desired entity ID and time from the input_datetime, so that the integration’s async_set_value method is invoked, writing the new charging schedule to the inverter via Modbus and the card updates. I'm a HA newbie so apologies if there's an easier way. PS: Hi Steve! Ian. The solis_modbus init.py, as follows: And then my automations.yaml as follows: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have my Waveshare devices working, I have added the following two entities to a card and can confirm the inverter is accepting the values (soliscloud.com is updating correctly).
time.rai_3k_48es_5g_solis_time_charging_charge_start_slot_1
time.rai_3k_48es_5g_solis_time_charging_charge_end_slot_1
However, when I try to change these in automation.yaml it fails. I have tried several different ways and I just can't make changes to these two. I want the code to change the charge times as if the user had done it via the card.
Any ideas?........maybe writing to the modbus registers direct (I tried but couldn't get the code right for that).
The code below uses a couple of helpers, and they change just fine, just not the entities.
Ian.
Beta Was this translation helpful? Give feedback.
All reactions