Skip to content

Latest commit

 

History

History
44 lines (31 loc) · 1.45 KB

README.md

File metadata and controls

44 lines (31 loc) · 1.45 KB

pyXcomfort

Build Status Coverage Status Known Vulnerabilities

This is an unofficial Python library for controlling Moeller Eaton Xcomfort lights. It requires the RS-232 programming interface.

This repository is not associated with Moeller Eaton, Home Assistant or other integrations.

How to use

git clone [email protected]:olekenneth/pyXcomfort.git xcomfort

Callback when a specific light changes

from xcomfort.xcomfort import Xcomfort

xcomfort = Xcomfort(devicePath='/dev/ttyUSB0')
xcomfort.lights = [{ serial: 2118491, name: 'Plafond' }, ... ]

def lightChangeCallback(light):
  print(light.name + ' changed state to ' + str(light.state))

light = xcomfort.lights[0]
light.onChange(lightChangeCallback)
light.state = False   # turn off the light
light.brightness = 25 # turn light on and set brightness to 25%

Callback when one of the lights change

xcomfort.onLight(lightChangeCallback)

Contribute

Please contribute.

License

GPLv3 see LICENSE