The last condition for me causes a 30% of failures in the sync of the entities.
I think is not usefull and when removed everything works fine becasue the save exist if on the state
Also I was getting a lot of errors for devices going into unavailable state so I added this:
- condition: template
value_template: '{{ trigger.to_state.state != "unavailable" }}'
as third condition