[Gardening] Rewrite Transistor.notify with pattern matching

Signed-off-by: chatgris <jboyer@af83.com>