Hi
Is there any way to set the valve status to heating? I was assuming
state.set(f"{valve}.hvac_action") = “heating” would work but it doesnt do anything
Thanks
Hi
Is there any way to set the valve status to heating? I was assuming
state.set(f"{valve}.hvac_action") = “heating” would work but it doesnt do anything
Thanks
You’re going to need to give us a bit more information than that! What valve?
It it’s a genuine Valve entity, there are various actions to control it:
but I suspect you’re actually interacting with a Climate entity, which has a set_hvac_mode action:
state.set() certainly isn’t a thing. Not sure why you’d assume that’d work: did an AI suggest it?
Maybe they’re using Pyscript…I think state.set() is a thing there?
It is, yes, with the value as part of the function call. That would make sense with the f-string in the attempt.
https://hacs-pyscript.readthedocs.io/en/latest/reference.html#state-variable-functions
If that is the case, it’d be this for setting an attribute:
state.setattr(f"{valve}.hvac_action", "heating")
Hi
Yes in using pyscript. Its a bt climate entity, I should have mentioned that.
My rationale is that since it reading the data with get, there should be a set too, isn’t it?
Thanks
I haven’t used pyscript, but it looks from my link above that there is a set, but it doesn’t work the way you’ve assumed. Try the syntax in my prior post for setattr.
hmm… it sets the hvac mode to heating but doesnt open phisically the valve, which is what i am after… any idea how this can be done? via zigbee maybe?
Why aren’t you using the Climate actions as everyone else?
ok, which action should i use in pyscript to open the valve? I am building an automation to implement a look ahead mechanism and open a valve when it less than 0.2C below the desired temperature (my histeresis is 0.3) if the boiler is already on.
I have all the logic, i can set the valve to heating mode, but, i cant send the command to force the valve to open
Thanks