Javascript changed/updated

I’m using a rule to capture an update on my energy, I’m just checking if item('energy;).changed() will fire for all events ie if I see to values the same will it fire? or is receivedUpdate() correct?
What is the correct syntax for capturing all values?

see below example.

rules.when().item("Energy_Mains_Total_minute").changed().then(event => {	
	console.log("Energy JS wattmin: " + event.newState)
    
}).build("Energy Consumption", "calculate energy usage every update");

No, that’s what changed means. It only triggers the rule when the Item changes state.

If you want to trigger the rule even when the Item doesn’t change as a result of an update than yes. That’s why both triggers exist.