Community member rodpayne created a python_script that can be used to set an entity’s state or attribute. It was originally created to set the state of a ‘read-only’ entity like a sensor but he enhanced it to allow setting an attribute.
The thing to keep in mind that is that when this python_script sets an entity’s state or attribute, that ‘forced’ value doesn’t survive a restart. For example, if you use it to set away_temp, on startup its value will revert to whatever you specified in its configuration.