| 1 | """Setup common light test helpers.""" |
| 2 | |
| 3 | import pytest |
| 4 | |
| 5 | |
| 6 | @pytest.fixture |
| 7 | def deconz_light(deconz_refresh_state): |
| 8 | """Comfort fixture to initialize deCONZ light.""" |
| 9 | |
| 10 | async def data_to_deconz_session(light): |
| 11 | """Initialize deCONZ light.""" |
| 12 | deconz_session = await deconz_refresh_state(lights={"0": light}) |
| 13 | return deconz_session.lights["0"] |
| 14 | |
| 15 | return data_to_deconz_session |