Trigger Bit if true

I have 2 custom properties.

ChargedBit (Boolean)
ChargedTime (String which has a query to display the current time)

Chargedbit is linked to a button.

When ChargedBit goes true i want to send ChargedTime to a tag called Charged Time-Date

I know it needs an if true statement but I cant figure it out and I’ve searched and cant find anything similar.

This Python script needs to go into the propertyChange event of the button. Modify it as needed.

if event.propertyName == "ChargedBit":
	if event.newValue == True:
		system.tag.write("Charged Time-Date", event.source.ChargedTime)