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

Add climate platform to zwave_js (#45177)

* add zwave_js support for climate

* fix

* add fixture

* rename fixture

* fix variable name error

* add tests

* fix tests and handle set_temp properly based on unit

* update call being tested

* fix tests

* improve coverage

* fix docstring

* address review comments

* fix test

* update enum class name

* bump zwave-js-server-python version and assume primary_value is always set

* add additional coverage

* fix docstrings and move populating modes/presets into initialization

* attempt to address comments

* improve comment

* move mode value into a variable so its easier to iterate in the future

* dont assume mode as a discovery point

* assume all values are available when node is ready

* fix order of operations

* switch to valueerror

* use primary value

* readd property and type to discovery schema
This commit is contained in:
Raman Gupta
2021-01-17 20:45:06 -06:00
committed by GitHub
parent a1b0d6baad
commit b2f914823d
6 changed files with 1351 additions and 1 deletions

View File

@@ -67,6 +67,14 @@ def lock_schlage_be469_state_fixture():
return json.loads(load_fixture("zwave_js/lock_schlage_be469_state.json"))
@pytest.fixture(name="climate_radio_thermostat_ct100_plus_state", scope="session")
def climate_radio_thermostat_ct100_plus_state_fixture():
"""Load the climate radio thermostat ct100 plus node state fixture data."""
return json.loads(
load_fixture("zwave_js/climate_radio_thermostat_ct100_plus_state.json")
)
@pytest.fixture(name="client")
def mock_client_fixture(controller_state, version_state):
"""Mock a client."""
@@ -122,6 +130,16 @@ def lock_schlage_be469_fixture(client, lock_schlage_be469_state):
return node
@pytest.fixture(name="climate_radio_thermostat_ct100_plus")
def climate_radio_thermostat_ct100_plus_fixture(
client, climate_radio_thermostat_ct100_plus_state
):
"""Mock a climate radio thermostat ct100 plus node."""
node = Node(client, climate_radio_thermostat_ct100_plus_state)
client.driver.controller.nodes[node.node_id] = node
return node
@pytest.fixture(name="integration")
async def integration_fixture(hass, client):
"""Set up the zwave_js integration."""