TasmotaLight

class knut.services.light.tasmota_light.TasmotaLight(location: str, uid: str, room: str, ip: str, dimmable: bool = False)

Light with the Tasmota firmware as light service.

Extend the Light service to use a tasmota light which can be controlled via a web API.

The light has an uid and location within a room.

If the state of the light changes, e.g. when calling status_setter(), the method on_change() is called with the uid as argument. Any listener can register upon this event.

status_setter(status: dict)None

Applies the status to the back-end.

The status dictionary must have 'state' as key and can have the following keys additional:

  • The 'dimlevel' dimlevel.

  • The lights 'temperature' temperature.

  • The light 'color' light.