Trying to set state of button to off

For what it’s worth, I have a version of the set_state script that works the same way for changing the state, but also allows you to change any attribute.
https://community.home-assistant.io/t/how-to-manually-set-state-value-of-sensor/43975/8