1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Fix zwave_js None color value (#50926)

This commit is contained in:
Martin Hjelmare
2021-05-25 13:40:22 +02:00
committed by GitHub
parent e9c787a5eb
commit bdb8cdf717
5 changed files with 712 additions and 5 deletions

View File

@@ -184,6 +184,12 @@ def bulb_6_multi_color_state_fixture():
return json.loads(load_fixture("zwave_js/bulb_6_multi_color_state.json"))
@pytest.fixture(name="light_color_null_values_state", scope="session")
def light_color_null_values_state_fixture():
"""Load the light color null values node state fixture data."""
return json.loads(load_fixture("zwave_js/light_color_null_values_state.json"))
@pytest.fixture(name="eaton_rf9640_dimmer_state", scope="session")
def eaton_rf9640_dimmer_state_fixture():
"""Load the eaton rf9640 dimmer node state fixture data."""
@@ -429,6 +435,14 @@ def bulb_6_multi_color_fixture(client, bulb_6_multi_color_state):
return node
@pytest.fixture(name="light_color_null_values")
def light_color_null_values_fixture(client, light_color_null_values_state):
"""Mock a node with current color value item being null."""
node = Node(client, copy.deepcopy(light_color_null_values_state))
client.driver.controller.nodes[node.node_id] = node
return node
@pytest.fixture(name="eaton_rf9640_dimmer")
def eaton_rf9640_dimmer_fixture(client, eaton_rf9640_dimmer_state):
"""Mock a Eaton RF9640 (V4 compatible) dimmer node."""