lifx-emulator 2.2.0__py3-none-any.whl → 2.2.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -240,12 +240,25 @@ class GetEffectHandler(PacketHandler):
240
240
  # Create effect settings with Sky parameters
241
241
  from lifx_emulator.protocol.protocol_types import TileEffectSkyType
242
242
 
243
- # Use defaults for SKY effect (type=5), otherwise use stored values
243
+ # Use defaults for SKY effect when values are None, otherwise use stored values
244
+ # NOTE: Must check for None explicitly, not use 'or', because SUNRISE=0 is falsy
244
245
  effect_type = TileEffectType(device_state.tile_effect_type)
245
246
  if effect_type == TileEffectType.SKY:
246
- sky_type = device_state.tile_effect_sky_type or TileEffectSkyType.CLOUDS
247
- cloud_sat_min = device_state.tile_effect_cloud_sat_min or 50
248
- cloud_sat_max = device_state.tile_effect_cloud_sat_max or 180
247
+ sky_type = (
248
+ device_state.tile_effect_sky_type
249
+ if device_state.tile_effect_sky_type is not None
250
+ else TileEffectSkyType.CLOUDS
251
+ )
252
+ cloud_sat_min = (
253
+ device_state.tile_effect_cloud_sat_min
254
+ if device_state.tile_effect_cloud_sat_min is not None
255
+ else 50
256
+ )
257
+ cloud_sat_max = (
258
+ device_state.tile_effect_cloud_sat_max
259
+ if device_state.tile_effect_cloud_sat_max is not None
260
+ else 180
261
+ )
249
262
  else:
250
263
  sky_type = device_state.tile_effect_sky_type
251
264
  cloud_sat_min = device_state.tile_effect_cloud_sat_min
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lifx-emulator
3
- Version: 2.2.0
3
+ Version: 2.2.1
4
4
  Summary: LIFX Emulator for testing LIFX LAN protocol libraries
5
5
  Author-email: Avi Miller <me@dje.li>
6
6
  Maintainer-email: Avi Miller <me@dje.li>
@@ -34,7 +34,7 @@ lifx_emulator/handlers/device_handlers.py,sha256=1AmslA4Ut6L7b3SfduDdvnQizTpzUB3
34
34
  lifx_emulator/handlers/light_handlers.py,sha256=Ryz-_fzoVCT6DBkXhW9YCOYJYaMRcBOIguL3HrQXhAw,11471
35
35
  lifx_emulator/handlers/multizone_handlers.py,sha256=2dYsitq0KzEaxEAJmz7ixtir1tvFMOAnfkBQqslqbPM,7914
36
36
  lifx_emulator/handlers/registry.py,sha256=s1ht4PmPhXhAcwu1hoY4yW39wy3SPJBMY-9Uxd0FWuE,3292
37
- lifx_emulator/handlers/tile_handlers.py,sha256=tQSq5hptq_CWlsc0q_I1D3WLcNmOliR47gY2AZI9AEs,12329
37
+ lifx_emulator/handlers/tile_handlers.py,sha256=Ci_SrOldf2I8djEd2JJZZ5iR5b4_HvzlWTkaBiCTx7c,12785
38
38
  lifx_emulator/products/__init__.py,sha256=qcNop_kRYFF3zSjNemzQEgu3jPrIxfyQyLv9GsnaLEI,627
39
39
  lifx_emulator/products/generator.py,sha256=5zcq0iKgwjtg0gePnBEOdIkumesvfzEcKRdBZFPyGtk,33538
40
40
  lifx_emulator/products/registry.py,sha256=qkm2xgGZo_ds3wAbYplLu4gb0cxhjZXjnCc1V8etpHw,46517
@@ -55,8 +55,8 @@ lifx_emulator/scenarios/__init__.py,sha256=CGjudoWvyysvFj2xej11N2cr3mYROGtRb9zVH
55
55
  lifx_emulator/scenarios/manager.py,sha256=1esxRdz74UynNk1wb86MGZ2ZFAuMzByuu74nRe3D-Og,11163
56
56
  lifx_emulator/scenarios/models.py,sha256=BKS_fGvrbkGe-vK3arZ0w2f9adS1UZhiOoKpu7GENnc,4099
57
57
  lifx_emulator/scenarios/persistence.py,sha256=3vjtPNFYfag38tUxuqxkGpWhQ7uBitc1rLroSAuw9N8,8881
58
- lifx_emulator-2.2.0.dist-info/METADATA,sha256=IYeBVFaQco74YbRC2s-orGbU4zWnrTrNAnwiT08nxPM,4549
59
- lifx_emulator-2.2.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
60
- lifx_emulator-2.2.0.dist-info/entry_points.txt,sha256=R9C_K_tTgt6yXEmhzH4r2Yx2Tu1rLlnYzeG4RFUVzSc,62
61
- lifx_emulator-2.2.0.dist-info/licenses/LICENSE,sha256=eBz48GRA3gSiWn3rYZAz2Ewp35snnhV9cSqkVBq7g3k,1832
62
- lifx_emulator-2.2.0.dist-info/RECORD,,
58
+ lifx_emulator-2.2.1.dist-info/METADATA,sha256=AWoxTE55eL8Ga1ORQaXG0gammepJigzKqTrxDj-1UqA,4549
59
+ lifx_emulator-2.2.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
60
+ lifx_emulator-2.2.1.dist-info/entry_points.txt,sha256=R9C_K_tTgt6yXEmhzH4r2Yx2Tu1rLlnYzeG4RFUVzSc,62
61
+ lifx_emulator-2.2.1.dist-info/licenses/LICENSE,sha256=eBz48GRA3gSiWn3rYZAz2Ewp35snnhV9cSqkVBq7g3k,1832
62
+ lifx_emulator-2.2.1.dist-info/RECORD,,