Event Logging: How to have get_dio_value return 1 or 0 instead of IOValue.HIGH / LOW

I am logging events in python… simple IO change of state events.
When I say value = module.get_io_value and log/print the content of value of course you get either IOValue.HIGH or IOValue.LOW.

I want to log a 1 for IOValue.HIGH and a 0 for IOValue.LOW instead. how do I do that. Could use an if statement to filter and rename each time. thoughts? thanks :slight_smile:

I am using an XBee3