I don’t know how that ever worked for you. That will always return 0, no matter what. You’re casting a state object as an int. Then you you it again. This is a state object, it is not the ‘state’. That syntax in all versions of home assistant is invalid. It only would have have worked if you added .state
at the end.
{% set time = states.sensor.apc_pro_rs900g_battery_runtime.state | int %}
^
^
^