Automatically check desired state against current state in switch/light service calls

It would be great if home assistant had a feature similar to idempotency in Ansible.

Currently to avoid sending a command for lights or switches for example to turn on/off if they are already the desired state requires a Jinja template or UI configured condition. It would be great to have something similar to adding
enabled: false to an action, to add something along the lines of idempotent: true or some other name for this.

I think it shouldn’t be default behavior without the user adding this in yaml or pressing a button in the UI just in case a user wants to run the command regardless of the targeted entities current state.

Home Assistant would use the desired state of the service call and the current state of targeted entities to determine whether or not to run at all or in the case of multiple targeted entities only run against those with a current state opposite of the desired state.

The purpose of using these conditions in the first place saves network bandwidth for ZigBee/Z-Wave or similar networks to only send commands when needed.