diff --git a/custom_components/wundasmart/strings.json b/custom_components/wundasmart/strings.json index bea83f4..0de5104 100644 --- a/custom_components/wundasmart/strings.json +++ b/custom_components/wundasmart/strings.json @@ -35,11 +35,10 @@ "water_heater": { "wundasmart": { "state": { - "auto": "Auto", "auto_on": "On (Auto)", "auto_off": "Off (Auto)", "boost_on": "On", - "off": "Off" + "boost_off": "Off" }, "state_attributes": { "operation_mode": { diff --git a/custom_components/wundasmart/translations/en.json b/custom_components/wundasmart/translations/en.json index 1856a5e..dd1c9d5 100644 --- a/custom_components/wundasmart/translations/en.json +++ b/custom_components/wundasmart/translations/en.json @@ -31,6 +31,31 @@ } } } + }, + "water_heater": { + "wundasmart": { + "state": { + "auto_on": "On (Auto)", + "auto_off": "Off (Auto)", + "boost_on": "On", + "boost_off": "Off" + }, + "state_attributes": { + "operation_mode": { + "state": { + "auto": "Auto", + "boost_30": "Boost (30 mins)", + "boost_60": "Boost (1 hour)", + "boost_90": "Boost (1.5 hours)", + "boost_120": "Boost (2 hours)", + "off_30": "Off (30 mins)", + "off_60": "Off (1 hour)", + "off_90": "Off (1.5 hours)", + "off_120": "Off (2 hours)" + } + } + } + } } } -} +} \ No newline at end of file diff --git a/custom_components/wundasmart/water_heater.py b/custom_components/wundasmart/water_heater.py index 43fdda4..78aef67 100644 --- a/custom_components/wundasmart/water_heater.py +++ b/custom_components/wundasmart/water_heater.py @@ -36,8 +36,7 @@ STATE_AUTO_ON = "auto_on" STATE_AUTO_OFF = "auto_off" STATE_BOOST_ON = "boost_on" -STATE_OFF = "boost_off" -STATE_AUTO = "auto" +STATE_BOOST_OFF = "boost_off" OPERATION_SET_AUTO = "auto" OPERATION_BOOST_30 = "boost_30" @@ -176,7 +175,7 @@ def __update_state(self): if hw_mode_state: self._attr_current_operation = STATE_BOOST_ON if hw_boost_state else STATE_AUTO_ON else: - self._attr_current_operation = STATE_OFF if hw_boost_state else STATE_AUTO_OFF + self._attr_current_operation = STATE_BOOST_OFF if hw_boost_state else STATE_AUTO_OFF @callback def _handle_coordinator_update(self) -> None: diff --git a/tests/test_water_heater.py b/tests/test_water_heater.py index 13dda76..9cee0c7 100644 --- a/tests/test_water_heater.py +++ b/tests/test_water_heater.py @@ -71,4 +71,4 @@ async def test_water_header_boost(hass: HomeAssistant, config): # Check send_command was called correctly assert mock.call_count == 1 assert mock.call_args.kwargs["params"]["cmd"] == 3 - assert mock.call_args.kwargs["params"]["hw_boost_time"] == 600 \ No newline at end of file + assert mock.call_args.kwargs["params"]["hw_boost_time"] == 600