How I have automated my lights

See Design Pattern: Unbound Item (aka Virtual Item) and Design Pattern: Proxy Item