Open JohanAlvedal opened 2 months ago
1244 | 2024-09-02 15:51:34.844715: Warn: Inverter 0 unable to find service template for discharge_start_service
This is a spurious warning and can be ignored (typo)
1243 | 2024-09-02 15:51:34.844549: Warn: Failed to decode response from http://supervisor/core/api/services/huawei_solar/forcible_discharge_soc 1242 | 2024-09-02 15:51:34.836734: Inverter 0 Call service huawei_solar/forcible_discharge_soc with data {'device_id': '6893ee838a0972bd3e50d9e0faa0ba5a', 'target_soc': 6, 'power': 3500}
This implies home assistant didnt like your sevice call. Is the service name and device_id correct, can you call this service in HA in developer tools and does it work?
ok could it be that earlier I ran charge_start_service: huawei_solar/forcible_charge_soc and so you and I had a discussion about running on time instead of %? You said I could change the time in the config file but I was unsure how The new formatting for in time is
charge_start_service: huawei_solar/forcible_charge charge_stop_service: huawei_solar/stop_forcible_charge discharge_start_service: huawei_solar/forcible_discharge discharge_stop_service: huawei_solar/stop_forcible_charge
To run in time instead of %, duration:XX must be added, but I'm not sure how it should look in the apps.yaml file
Action call in Home assistant in time that works action: huawei_solar.forcible_charge data: duration: 60 # time in minutes power: 2500 # power in W device_id: 6893ee838a0972bd3e50d9e0faa0ba5a
action: huawei_solar.forcible_discharge data: duration: 60 # time in minutes power: 2500 # power in W device_id: 6893ee838a0972bd3e50d9e0faa0ba5a
And to % action: huawei_solar.forcible_charge_soc data: device_id: 6893ee838a0972bd3e50d9e0faa0ba5a target_soc: 50 # target in % power: "1000"
So you need to change your service templates e.g:
charge_start_service:
duration: 60
power: {power}
device_id: 6893ee838a0972bd3e50d9e0faa0ba5a
This should work.
Where this template is put ?
Describe the bug
Expected behavior Call action (service) charge an dischage missing template?
Predbat version
8.4.4
Environment details
Log file