Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
console_logger.py
test.py
__pycache__

# IDE configurations
/.idea

# Development environment
/.venv
/venv
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ The default entity names are listed below. Note that some entities can be missed

### water_heater.*kettle_model*
This is main entity to control water boiling and heating. There are five operation modes:
* Off - the kettle is off, not heating at all.
* Heat - just heat water to the desired temperature and keep this temperature. Without boiling. Useful when water already boiled and you need just to warm it up.
* Boil - boil water and turn off (switch to "Off" mode).
* Boil+heat - boil water, wait until temperature drops to the desired temperature and keep this temperature.
* Lamp - use kettle as night light, color changes between the selected ones (see below).
* Light - use kettle as night light but keep the only one selected color (see below).
* `off` - the kettle is off, not heating at all.
* `heat` - just heat water to the desired temperature and keep this temperature. Without boiling. Useful when water already boiled and you need just to warm it up.
* `boli` - boil water and turn off (switch to "Off" mode).
* `boil_heat` - boil water, wait until temperature drops to the desired temperature and keep this temperature.
* `lamp` - use kettle as night light, color changes between the selected ones (see below).
* `light` - use kettle as night light but keep the only one selected color (see below).

### light.*kettle_model*_light (Light)
This entity allows to control the "Light" mode. You can select brightness and color when this mode is active. The "Light" mode will be enabled automatically when this virtual light is on.
Expand Down Expand Up @@ -112,7 +112,7 @@ Diagnostic entity, shows percent of successfull connections and polls.
sequence:
- service: water_heater.set_operation_mode
data:
operation_mode: Boil
operation_mode: boil
target:
entity_id: water_heater.skykettle_rk_g211
```
Expand All @@ -131,7 +131,7 @@ sequence:
sequence:
- service: water_heater.set_operation_mode
data:
operation_mode: Boil+Heat
operation_mode: boil_heat
target:
entity_id: water_heater.skykettle_rk_g211
- service: water_heater.set_temperature
Expand Down
24 changes: 24 additions & 0 deletions custom_components/skykettle/icons.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"entity": {
"water_heater": {
"skykettle": {
"default": "mdi:kettle",
"state": {
"off": "mdi:kettle-off"
},
"state_attributes": {
"operation_mode": {
"default": "mdi:kettle-off",
"state": {
"boil": "mdi:kettle-steam",
"boil_heat": "mdi:kettle-steam-outline",
"heat": "mdi:heat-wave",
"lamp": "mdi:lightbulb-night",
"light": "mdi:lightbulb"
}
}
}
}
}
}
}
3 changes: 2 additions & 1 deletion custom_components/skykettle/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
"name": "SkyKettle",
"codeowners": ["@clusterm"],
"config_flow": true,
"dependencies": ["bluetooth_adapters", "bleak_retry_connector"],
"dependencies": ["bluetooth_adapters"],
"documentation": "https://github.com/ClusterM/skykettle-ha/blob/master/README.md",
"integration_type": "device",
"iot_class": "local_polling",
"issue_tracker": "https://github.com/ClusterM/skykettle-ha/issues",
"requirements": [],
Expand Down
10 changes: 5 additions & 5 deletions custom_components/skykettle/skykettle.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ class SkyKettle():
MODE_LAMP = 0x03
MODE_GAME = 0x04
MODE_NAMES = {
MODE_BOIL: "Boil",
MODE_HEAT: "Heat",
MODE_BOIL_HEAT: "Boil+Heat",
MODE_LAMP: "Lamp",
MODE_GAME: "Light"
MODE_BOIL: "boil",
MODE_HEAT: "heat",
MODE_BOIL_HEAT: "boil_heat",
MODE_LAMP: "lamp",
MODE_GAME: "light"
}

LIGHT_BOIL = 0x00
Expand Down
15 changes: 15 additions & 0 deletions custom_components/skykettle/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,20 @@
}
}
}
},
"entity": {
"water_heater": {
"skykettle": {
"name": "Kettle",
"state": {
"off": "Off",
"boil": "Boiling",
"boil_heat": "Boiling + Heating",
"heat": "Heating",
"lamp": "Nightlight",
"light": "Light"
}
}
}
}
}
15 changes: 15 additions & 0 deletions custom_components/skykettle/translations/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,20 @@
}
}
}
},
"entity": {
"water_heater": {
"skykettle": {
"name": "Чайник",
"state": {
"off": "Выключено",
"boil": "Кипячение",
"boil_heat": "Кипячение + Подогрев",
"heat": "Подогрев",
"lamp": "Ночник",
"light": "Подсветка"
}
}
}
}
}
14 changes: 0 additions & 14 deletions custom_components/skykettle/translations/water_heater.en.json

This file was deleted.

14 changes: 0 additions & 14 deletions custom_components/skykettle/translations/water_heater.ru.json

This file was deleted.

12 changes: 3 additions & 9 deletions custom_components/skykettle/water_heater.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ async def async_setup_entry(hass, entry, async_add_entities, discovery_info=None

class SkyWaterHeater(WaterHeaterEntity):
"""Representation of a SkyKettle water_heater device."""
_attr_has_entity_name = True
_attr_name = None
_attr_translation_key = "skykettle"

def __init__(self, hass, entry):
"""Initialize the water_heater device."""
Expand All @@ -44,15 +47,6 @@ def kettle(self):
def unique_id(self):
return self.entry.entry_id + "_water_heater"

@property
def name(self):
"""Name of the entity."""
return (FRIENDLY_NAME + " " + self.entry.data.get(CONF_FRIENDLY_NAME, "")).strip()

@property
def icon(self):
return "mdi:kettle"

@property
def device_class(self):
return None
Expand Down