Use consistent function order.
Don't default required arguments to None.
Register script can now also register sensors.