Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extend documentation #49

Merged
merged 1 commit into from
Feb 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 50 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ This repository provides an unofficial Python client for controlling the IKEA Di
- [remote controllers](#remote-controllers) (tested with STYRBAR)
- [environment sensor](#environment-sensor) (tested with VINDSTYRKA)
- [scene](#scene)
- [motion sensor](#motion-sensor)
- [event listener](#event-listener) for hub events

Support for other features will be added in the future and your input in form of issues and PRs is greatly appreciated.
Expand Down Expand Up @@ -169,7 +170,7 @@ The outlet object has the following attributes (additional to the core attribute

```python
is_on: bool
startup_on_off: Optional[StartupEnum]
startup_on_off: Optional[StartupEnum] = None
```

Available methods for outlet are:
Expand Down Expand Up @@ -250,6 +251,12 @@ min_measured_p_m25: int # minimum measurable particulate matter 2.5
voc_index: int # current volatile organic compound
```

Available methods for environment sensor are:

```python
sensor.set_name(name="Bathroom Sensor")
```

# [Scene](./src/dirigera/devices/scene.py)

To get the scenes use:
Expand Down Expand Up @@ -283,6 +290,48 @@ scene.trigger()
scene.undo()
```

## [Motion Sensor](./src/dirigera/devices/motion_sensor.py)

To get information about the available motion sensors, you can use the `get_motion_sensors()` method:

```python
motions_sensors = dirigera_hub.get_motion_sensors()
```

The motion sensor object has the following attributes (additional to the core attributes):

```python
battery_percentage: int
is_on: bool
light_level: Optional[float]
```

Available methods for outlet are:

```python
motions_sensor.set_name(name="kitchen sensor 1")
```

## [Open/Close Sensor](./src/dirigera/devices/open_close_sensor.py)

To get information about the available motion sensors, you can use the `get_open_close_sensors()` method:

```python
open_close_sensors = dirigera_hub.get_open_close_sensors()
```

The open_close_sensor object has the following attributes (additional to the core attributes):

```python
is_open: bool
```

Available methods for outlet are:

```python
open_close_sensor.set_name(name="window 1")
```

## Event Listener

The event listener allows you to listen to events that are published by your Dirigera hub. This is useful if you want to automate tasks based on events such as when a light is turned on or off, or when the color temperature of a light is changed.
Expand Down
Loading