* - updated water heater naming

* - initial support for built-in AC units

* Add support for Built-In AC Unit

Built-In AC unit operation and function is similar to a WAC.
`gehomesdk` version bumped from 0.4.25 to 0.4.27 to include latest
ErdApplianceType enum.

* Update README.md

Update README.md to include Built-In AC as supported device

* - updated zero serial number detection (resolves #89)

* - updated version
- updated changelog

* - hopefully fixed recursion bug with numbers

* - added cooktop support

* - fixed circular reference

* Add support for fridges with reduced support for ERD codes (no turbo mode, no current temperature reporting, no temperature setpoint limit reporting, no door status reporting). This change has been tested on a Fisher & Paykel RF610AA.

* - added dual dishwasher support
- updated documentation
- version bumps

* - added water heater support

* - added basic espresso maker device

* - bugfixes

* - rewrote initialization (resolves #99)

* - added logic to prevent double registration of entities

* - added correct min/max temps for water heaters

* Fix CoffeeMaker after the NumberEntity refactoring

* - added fix for CGY366P2TS1 (#116) to try to get the cooktop status, but fail more gracefully if it isn't supported

* - fixed region setting in update coordinator

* - version bump
- doc update
- string fixes

* - updated the temperature conversion to use non-deprecated HASS methods

* - updated documentation (@gleepwurp)

* - more documentation updates

* - updated dishwasher for new functionality
- updated documentation

* updated uom for liquid volume per HA specifications

* - fixed typo in oven (#149)

* - updated change log
- fixed oven light control (#144)

---------

Co-authored-by: Rob Schmidt <rwschmidt26@gmail.com>
Co-authored-by: Federico Sevilla <federico@sevilla.id.au>
Co-authored-by: alexanv1 <44785744+alexanv1@users.noreply.github.com>
This commit is contained in:
simbaja 2023-04-23 01:05:15 -04:00 committed by GitHub
parent c8d77120c9
commit 1b7e8179b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 81 additions and 22 deletions

View File

@ -1,6 +1,17 @@
# GE Home Appliances (SmartHQ) Changelog
## 0.6.6
- Bugfix: Fixed issue with region setting (EU accounts) [#130]
- Updated the temperature conversion (@partsdotpdf)
- Updated configuration documentation
- Modified dishwasher to include new functionality (@NickWaterton)
- Bugfix: Fixed oven typo (@jdc0730) [#149]
- Bugfix: UoM updates (@morlince) [#138]
- Updated light control (@tcgoetz) [#144]
- Dependency version bumps
## 0.6.5
- Added beverage cooler support (@kksligh)

View File

@ -26,6 +26,7 @@ Integration for GE WiFi-enabled appliances into Home Assistant. This integratio
## Updates
Unfortunately, I'm pretty much at the end of what I can do without assistance from others with these devices that can help provide logs. I'll do what I can to make updates if there's something broken, but I am not really able to add new functionality if I can't get a little help to do so.
## Home Assistant UI Examples
Entities card:
@ -56,9 +57,24 @@ A/C Controls:
## Installation (HACS)
Please follow directions [here](https://hacs.xyz/docs/faq/custom_repositories/), and use https://github.com/simbaja/ha_gehome as the repository URL.
## Configuration
Configuration is done via the HA user interface.
Configuration is done via the HA user interface. You need to have your device registered with the [SmartHQ](https://www.geappliances.com/connect) website.
Once the HACS Integration of GE Home is completed:
1. Navigate to Settings --> Devices & Services
2. Click **Add Integration** blue button on the bottom-right of the page
3. Locate the **GE Home (SmartHQ)** "Brand" (Integration)
4. Click on the integration, and you will be prompted to enter a Username, Password and Location (US or EU)
5. Enter the email address you used to register/connect your device as the Username
6. Same with the password
7. Select the region you registered your device in (US or EU).
8. Once you submit, the integration will log in and get all your connected devices.
9. You can define in which area you device is, then click **Finish**
10. Your sensors should appear as **sensor.<serial_number>_<sensor_function>**
ie: sensor.fs12345678_dishwasher_cycle_name
## Change Log

View File

@ -23,9 +23,13 @@ class DishwasherApi(ApplianceApi):
GeErdSensor(self, ErdCode.DISHWASHER_CYCLE_STATE, icon_override="mdi:state-machine"),
GeErdSensor(self, ErdCode.DISHWASHER_OPERATING_MODE),
GeErdSensor(self, ErdCode.DISHWASHER_PODS_REMAINING_VALUE, uom_override="pods"),
GeErdSensor(self, ErdCode.DISHWASHER_RINSE_AGENT, icon_override="mdi:shimmer"),
GeErdPropertySensor(self, ErdCode.DISHWASHER_REMINDERS, "add_rinse_aid", icon_override="mdi:shimmer"),
GeErdPropertySensor(self, ErdCode.DISHWASHER_REMINDERS, "clean_filter", icon_override="mdi:dishwasher-alert"),
GeErdPropertySensor(self, ErdCode.DISHWASHER_REMINDERS, "sanitized", icon_override="mdi:silverware-clean"),
GeErdSensor(self, ErdCode.DISHWASHER_TIME_REMAINING),
GeErdBinarySensor(self, ErdCode.DISHWASHER_DOOR_STATUS),
GeErdBinarySensor(self, ErdCode.DISHWASHER_IS_CLEAN),
GeErdBinarySensor(self, ErdCode.DISHWASHER_REMOTE_START_ENABLE),
#User Setttings
GeErdPropertySensor(self, ErdCode.DISHWASHER_USER_SETTING, "sound", icon_override="mdi:volume-high"),
@ -37,7 +41,12 @@ class DishwasherApi(ApplianceApi):
GeErdPropertySensor(self, ErdCode.DISHWASHER_USER_SETTING, "wash_temp", icon_override="mdi:coolant-temperature"),
GeErdPropertySensor(self, ErdCode.DISHWASHER_USER_SETTING, "dry_option", icon_override="mdi:fan"),
GeErdPropertySensor(self, ErdCode.DISHWASHER_USER_SETTING, "wash_zone", icon_override="mdi:dock-top"),
GeErdPropertySensor(self, ErdCode.DISHWASHER_USER_SETTING, "delay_hours", icon_override="mdi:clock-fast")
GeErdPropertySensor(self, ErdCode.DISHWASHER_USER_SETTING, "delay_hours", icon_override="mdi:clock-fast"),
#Cycle Counts
GeErdPropertySensor(self, ErdCode.DISHWASHER_CYCLE_COUNTS, "started", icon_override="mdi:counter"),
GeErdPropertySensor(self, ErdCode.DISHWASHER_CYCLE_COUNTS, "completed", icon_override="mdi:counter"),
GeErdPropertySensor(self, ErdCode.DISHWASHER_CYCLE_COUNTS, "reset", icon_override="mdi:counter")
]
entities = base_entities + dishwasher_entities
return entities

View File

@ -10,6 +10,7 @@ from gehomesdk import (
OvenConfiguration,
ErdCooktopConfig,
CooktopStatus,
ErdOvenLightLevel,
ErdOvenLightLevelAvailability
)
@ -43,7 +44,9 @@ class OvenApi(ApplianceApi):
has_upper_raw_temperature = self.has_erd_code(ErdCode.UPPER_OVEN_RAW_TEMPERATURE)
has_lower_raw_temperature = self.has_erd_code(ErdCode.LOWER_OVEN_RAW_TEMPERATURE)
upper_light : ErdOvenLightLevel = self.try_get_erd_value(ErdCode.UPPER_OVEN_LIGHT)
upper_light_availability: ErdOvenLightLevelAvailability = self.try_get_erd_value(ErdCode.UPPER_OVEN_LIGHT_AVAILABILITY)
lower_light : ErdOvenLightLevel = self.try_get_erd_value(ErdCode.LOWER_OVEN_LIGHT)
lower_light_availability: ErdOvenLightLevelAvailability = self.try_get_erd_value(ErdCode.LOWER_OVEN_LIGHT_AVAILABILITY)
_LOGGER.debug(f"Oven Config: {oven_config}")
@ -64,7 +67,7 @@ class OvenApi(ApplianceApi):
GeErdSensor(self, ErdCode.LOWER_OVEN_COOK_TIME_REMAINING),
GeErdTimerSensor(self, ErdCode.LOWER_OVEN_KITCHEN_TIMER),
GeErdSensor(self, ErdCode.LOWER_OVEN_USER_TEMP_OFFSET),
GeErdSensor(self, ErdCode.UPPER_OVEN_DISPLAY_TEMPERATURE),
GeErdSensor(self, ErdCode.LOWER_OVEN_DISPLAY_TEMPERATURE),
GeErdBinarySensor(self, ErdCode.LOWER_OVEN_REMOTE_ENABLED),
GeOven(self, LOWER_OVEN, True, self._temperature_code(has_lower_raw_temperature)),
@ -74,7 +77,7 @@ class OvenApi(ApplianceApi):
oven_entities.append(GeErdSensor(self, ErdCode.UPPER_OVEN_RAW_TEMPERATURE))
if has_lower_raw_temperature:
oven_entities.append(GeErdSensor(self, ErdCode.LOWER_OVEN_RAW_TEMPERATURE))
if lower_light_availability is None or lower_light_availability.is_available:
if lower_light_availability is None or lower_light_availability.is_available or lower_light is not None:
oven_entities.append(GeOvenLightLevelSelect(self, ErdCode.LOWER_OVEN_LIGHT))
else:
oven_entities.extend([
@ -88,7 +91,7 @@ class OvenApi(ApplianceApi):
])
if has_upper_raw_temperature:
oven_entities.append(GeErdSensor(self, ErdCode.UPPER_OVEN_RAW_TEMPERATURE, self._single_name(ErdCode.UPPER_OVEN_RAW_TEMPERATURE)))
if upper_light_availability is None or upper_light_availability.is_available:
if upper_light_availability is None or upper_light_availability.is_available or upper_light is not None:
oven_entities.append(GeOvenLightLevelSelect(self, ErdCode.UPPER_OVEN_LIGHT, self._single_name(ErdCode.UPPER_OVEN_LIGHT)))

View File

@ -118,7 +118,7 @@ class GeErdSensor(GeErdEntity, SensorEntity):
if self.erd_code_class == ErdCodeClass.LIQUID_VOLUME:
#if self._measurement_system == ErdMeasurementUnits.METRIC:
# return "l"
return "g"
return "gal"
return None
def _get_device_class(self) -> Optional[str]:

View File

@ -1,13 +1,13 @@
"""GE Home Sensor Entities - Abstract Fridge"""
import importlib
import sys
import os
import abc
import logging
from typing import Any, Dict, List, Optional
from homeassistant.const import ATTR_TEMPERATURE, TEMP_CELSIUS, TEMP_FAHRENHEIT
from homeassistant.util.temperature import convert as convert_temperature
from homeassistant.const import ATTR_TEMPERATURE, TEMP_FAHRENHEIT
from homeassistant.util.unit_conversion import TemperatureConverter
from gehomesdk import (
ErdCode,
ErdOnOff,
@ -117,7 +117,7 @@ class GeAbstractFridge(GeAbstractWaterHeater):
return getattr(self.setpoint_limits, f"{self.heater_type}_min")
except:
_LOGGER.debug("No temperature setpoint limits available. Using hardcoded limits.")
return convert_temperature(self.temp_limits[f"{self.heater_type}_min"], TEMP_FAHRENHEIT, self.temperature_unit)
return TemperatureConverter.convert(self.temp_limits[f"{self.heater_type}_min"], TEMP_FAHRENHEIT, self.temperature_unit)
@property
def max_temp(self):
@ -126,7 +126,7 @@ class GeAbstractFridge(GeAbstractWaterHeater):
return getattr(self.setpoint_limits, f"{self.heater_type}_max")
except:
_LOGGER.debug("No temperature setpoint limits available. Using hardcoded limits.")
return convert_temperature(self.temp_limits[f"{self.heater_type}_max"], TEMP_FAHRENHEIT, self.temperature_unit)
return TemperatureConverter.convert(self.temp_limits[f"{self.heater_type}_max"], TEMP_FAHRENHEIT, self.temperature_unit)
@property
def current_operation(self) -> str:

View File

@ -4,7 +4,7 @@ import logging
from typing import List, Optional, Dict, Any
from homeassistant.const import ATTR_TEMPERATURE, TEMP_FAHRENHEIT
from homeassistant.util.temperature import convert as convert_temperature
from homeassistant.util.unit_conversion import TemperatureConverter
from gehomesdk import (
ErdCode,
@ -102,12 +102,12 @@ class GeDispenser(GeAbstractWaterHeater):
@property
def min_temp(self):
"""Return the minimum temperature."""
return convert_temperature(self._min_temp, TEMP_FAHRENHEIT, self.temperature_unit)
return TemperatureConverter.convert(self._min_temp, TEMP_FAHRENHEIT, self.temperature_unit)
@property
def max_temp(self):
"""Return the maximum temperature."""
return convert_temperature(self._max_temp, TEMP_FAHRENHEIT, self.temperature_unit)
return TemperatureConverter.convert(self._max_temp, TEMP_FAHRENHEIT, self.temperature_unit)
@property
def extra_state_attributes(self) -> Dict[str, Any]:

View File

@ -3,7 +3,7 @@
"name": "GE Home (SmartHQ)",
"config_flow": true,
"documentation": "https://github.com/simbaja/ha_gehome",
"requirements": ["gehomesdk==0.5.7","magicattr==0.1.5","slixmpp==1.7.1"],
"requirements": ["gehomesdk==0.5.9","magicattr==0.1.6","slixmpp==1.8.3"],
"codeowners": ["@simbaja"],
"version": "0.6.5"
"version": "0.6.6"
}

View File

@ -4,7 +4,8 @@
"user": {
"data": {
"username": "[%key:common::config_flow::data::username%]",
"password": "[%key:common::config_flow::data::password%]"
"password": "[%key:common::config_flow::data::password%]",
"region": "[%key:common::config_flow::data::region%]"
}
}
},

View File

@ -5,13 +5,15 @@
"init": {
"data": {
"username": "Username",
"password": "Password"
"password": "Password",
"region": "Region"
}
},
"user": {
"data": {
"username": "Username",
"password": "Password"
"password": "Password",
"region": "Region"
}
}
},

View File

@ -19,7 +19,7 @@ from gehomesdk import GeAuthFailedError, GeGeneralServerError, GeNotAuthenticate
from .exceptions import HaAuthError, HaCannotConnect
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME, CONF_REGION
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.dispatcher import async_dispatcher_send
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator
@ -48,6 +48,7 @@ class GeHomeUpdateCoordinator(DataUpdateCoordinator):
self._config_entry = config_entry
self._username = config_entry.data[CONF_USERNAME]
self._password = config_entry.data[CONF_PASSWORD]
self._region = config_entry.data[CONF_REGION]
self._appliance_apis = {} # type: Dict[str, ApplianceApi]
self._reset_initialization()
@ -78,6 +79,7 @@ class GeHomeUpdateCoordinator(DataUpdateCoordinator):
client = GeWebsocketClient(
self._username,
self._password,
self._region,
event_loop=event_loop,
)
client.add_event_handler(EVENT_APPLIANCE_INITIAL_UPDATE, self.on_device_initial_update)

View File

@ -1,6 +1,6 @@
{
"name": "GE Home (SmartHQ)",
"homeassistant": "2021.12.0",
"homeassistant": "2022.12.0",
"domains": ["binary_sensor", "sensor", "switch", "water_heater", "select", "button", "climate", "light", "number"],
"iot_class": "Cloud Polling"
}

15
info.md
View File

@ -46,6 +46,10 @@ A/C Controls:
#### Breaking Changes
{% if version_installed.split('.') | map('int') < '0.6.6'.split('.') | map('int') %}
- Requires HA version 2022.12.0 or later
{% endif %}
{% if version_installed.split('.') | map('int') < '0.6.0'.split('.') | map('int') %}
- Requires HA version 2021.12.0 or later
- Enabled authentication to both US and EU regions (may require re-auth)
@ -64,6 +68,9 @@ A/C Controls:
{% endif %}
#### Features
{% if version_installed.split('.') | map('int') < '0.6.6'.split('.') | map('int') %}
- Modified dishwasher to include new functionality (@NickWaterton)
{% endif %}
{% if version_installed.split('.') | map('int') < '0.6.5'.split('.') | map('int') %}
- Added beverage cooler support (@kksligh)
@ -104,6 +111,14 @@ A/C Controls:
#### Bugfixes
{% if version_installed.split('.') | map('int') < '0.6.6'.split('.') | map('int') %}
- Fixed region issues after setup (#130)
- Updated the temperature conversion (#137)
- UoM updates (#138)
- Fixed oven typo (#149)
- Updated light control (#144)
{% endif %}
{% if version_installed.split('.') | map('int') < '0.6.3'.split('.') | map('int') %}
- Updated detection of invalid serial numbers (#89)
- Updated implementation of number entities to fix deprecation warnings (#85)