Open sjs-1956 opened 10 months ago
Had the same problem. After quite a few tries, found out how it works (no info in the docs).
First, you have a typo. Change entity_id="input.datetime.battery_charge_start" into entity_id="input_datetime.battery_charge_start"
Second, for those looking to set a date or a datetime, use set_datetime(entity_id=xx, date=xx) or set_datetime(entity_id=xx, datetime=xx) accordingly
Here's the cure for you: https://github.com/dmamelin/pyscript_autocomplete
Interesting... A bit convoluted to use, but definitely useful I'll give it a try thanks !
I have a time helper entity set up. I want to change the time in the pyscript code. I've tried calling the service as below;
input.datetime.battery_charge_start.set_datetime(time="08:01:00") service.call("input_datetime", "set_datetime", entity_id="input.datetime.battery_charge_start", time="08:01:00") input_datetime.set_datetime(entity_id="input.datetime.battery_charge_start", time="08:01:00")
Neither work. However for another helper, this works;
input_number.set_value(entity_id="input_number.battery_monitor_start_secs", value=34)
I need a little help please.