Skip to content

Commit

Permalink
Added pause in test
Browse files Browse the repository at this point in the history
  • Loading branch information
Jelloeater committed Apr 8, 2023
1 parent 7074619 commit f78cfe5
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/classes.dot
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ charset="utf-8"
"hubitatcontrol.lights.Dimmer" [color="black", fontcolor="black", label=<{Dimmer|level<br ALIGN="LEFT"/>|set_level(level: int)<br ALIGN="LEFT"/>}>, shape="record", style="solid"];
"hubitatcontrol.generic.EcoBee" [color="black", fontcolor="black", label=<{EcoBee|<br ALIGN="LEFT"/>|}>, shape="record", style="solid"];
"hubitatcontrol.generic.GenericZWaveLock" [color="black", fontcolor="black", label=<{GenericZWaveLock|<br ALIGN="LEFT"/>|<I>lock</I>()<br ALIGN="LEFT"/><I>unlock</I>()<br ALIGN="LEFT"/>}>, shape="record", style="solid"];
"hubitatcontrol.hub.Hub" [color="black", fontcolor="black", label=<{Hub|app_id<br ALIGN="LEFT"/>base_url_prefix<br ALIGN="LEFT"/>cloud_token : NoneType<br ALIGN="LEFT"/>devices<br ALIGN="LEFT"/>host<br ALIGN="LEFT"/>token<br ALIGN="LEFT"/>|get_device(name: str)<br ALIGN="LEFT"/>}>, shape="record", style="solid"];
"hubitatcontrol.hub.Hub" [color="black", fontcolor="black", label=<{Hub|app_id<br ALIGN="LEFT"/>base_url_prefix<br ALIGN="LEFT"/>cloud_token : NoneType<br ALIGN="LEFT"/>devices<br ALIGN="LEFT"/>host<br ALIGN="LEFT"/>token<br ALIGN="LEFT"/>|get_device(name: str)<br ALIGN="LEFT"/>get_device_id(dev_id: int)<br ALIGN="LEFT"/>}>, shape="record", style="solid"];
"hubitatcontrol.lights.RGBWBulb" [color="black", fontcolor="black", label=<{RGBWBulb|color<br ALIGN="LEFT"/>color_mode<br ALIGN="LEFT"/>color_name<br ALIGN="LEFT"/>hue<br ALIGN="LEFT"/>saturation<br ALIGN="LEFT"/>|set_color(hue: int, saturation: int, level: int)<br ALIGN="LEFT"/>set_hue(hue: int)<br ALIGN="LEFT"/>set_saturation(saturation: int)<br ALIGN="LEFT"/>}>, shape="record", style="solid"];
"hubitatcontrol.generic.SonoffZigbeeButtonController" [color="black", fontcolor="black", label=<{SonoffZigbeeButtonController|<br ALIGN="LEFT"/>|}>, shape="record", style="solid"];
"hubitatcontrol.generic.Switch" [color="black", fontcolor="black", label=<{Switch|switch<br ALIGN="LEFT"/>|turn_off()<br ALIGN="LEFT"/>turn_on()<br ALIGN="LEFT"/>}>, shape="record", style="solid"];
Expand Down
3 changes: 3 additions & 0 deletions docs/hubitatcontrol/hub.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,7 @@
`get_device(self, name: str)`
:
`get_device_id(self, dev_id: int)`
:
```
2 changes: 1 addition & 1 deletion docs/hubitatcontrol/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ Hubitat Maker API
:

`lookup_device(hub_in, device_lookup)`
:
: Takes device NAME, not ID for lookup
1 change: 1 addition & 0 deletions docs/packages.dot
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ charset="utf-8"
"hubitatcontrol" -> "hubitatcontrol.generic" [arrowhead="open", arrowtail="none"];
"hubitatcontrol" -> "hubitatcontrol.hub" [arrowhead="open", arrowtail="none"];
"hubitatcontrol.__main__" -> "hubitatcontrol" [arrowhead="open", arrowtail="none"];
"hubitatcontrol.__main__" -> "hubitatcontrol.hub" [arrowhead="open", arrowtail="none"];
"hubitatcontrol.generic" -> "hubitatcontrol.hub" [arrowhead="open", arrowtail="none"];
"hubitatcontrol.lights" -> "hubitatcontrol.generic" [arrowhead="open", arrowtail="none"];
"hubitatcontrol.sensors" -> "hubitatcontrol.hub" [arrowhead="open", arrowtail="none"];
Expand Down
3 changes: 3 additions & 0 deletions tests/test_main.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os
import random
import time

import pytest
from dotenv import load_dotenv
Expand Down Expand Up @@ -50,8 +51,10 @@ def test_device_bulb():
test_bulb.set_hue(hue)

test_bulb.set_saturation(10)
time.sleep(1)
assert test_bulb.saturation == 10
test_bulb.set_saturation(80)
time.sleep(1)
assert test_bulb.saturation == 80
test_bulb.set_hue(sat)

Expand Down

0 comments on commit f78cfe5

Please sign in to comment.