Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to create custom entities #76

Draft
wants to merge 35 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
e4f49d2
Remove button platform.
denpamusic Feb 17, 2024
47d82c4
Remove update sub devices method.
denpamusic Feb 17, 2024
ea23e63
Add options flow.
denpamusic Feb 17, 2024
0c8ab0d
Merge branch 'main' into options_flow2
denpamusic Feb 17, 2024
1556f24
Sort translation files.
denpamusic Feb 17, 2024
fee651c
Simplify value formatter.
denpamusic Feb 17, 2024
46b2ae6
Merge branch 'main' into options_flow2
denpamusic Feb 17, 2024
0e62d22
Merge branch 'main' into options_flow2
denpamusic Feb 20, 2024
4711688
Revert "Add ash pan full sensor."
denpamusic Feb 20, 2024
8817d08
Add options to diagonstics.
denpamusic Feb 20, 2024
23ad64c
Cast source_device to str.
denpamusic Feb 21, 2024
ae3ba68
Improve readability.
denpamusic Feb 21, 2024
29542a1
Merge branch 'main' into options_flow2
denpamusic Mar 6, 2024
b7e784c
Merge branch 'main' into options_flow2
denpamusic Jun 22, 2024
aeeb8f9
Sort imports.
denpamusic Jun 22, 2024
fd50ed6
Fix incorrect return type.
denpamusic Jun 22, 2024
bbaaf2b
Clean up imports.
denpamusic Jun 22, 2024
5fba1a6
Fix typing.
denpamusic Jun 22, 2024
aeae054
Use runtime_data instead of data.
denpamusic Jun 22, 2024
96d52e9
Don't set platform in init.
denpamusic Jun 22, 2024
e22e0f2
Sort methods.
denpamusic Jun 23, 2024
c47b8c5
Simplify format value fn.
denpamusic Jun 23, 2024
92e9268
Improve annotation.
denpamusic Jun 23, 2024
7360062
Fix typing.
denpamusic Jun 23, 2024
2838642
Store options in OptionsFlow.
denpamusic Jun 23, 2024
ca43aa2
Add keys for entity dict.
denpamusic Jun 23, 2024
8b93de7
Merge branch 'main' into options_flow2
denpamusic Jul 4, 2024
6d7366d
Improve config flow.
denpamusic Jul 4, 2024
5104ab6
Merge branch 'main' into options_flow2
denpamusic Jul 4, 2024
92e833a
Fix typo.
denpamusic Jul 4, 2024
84026ba
Merge branch 'main' into options_flow2
denpamusic Sep 8, 2024
4e460ac
Update for PyPlumIO v5.2.8.
denpamusic Sep 8, 2024
3459553
Rename vars and reorder functions.
denpamusic Sep 8, 2024
2a3e77c
Merge branch 'main' into options_flow2
denpamusic Oct 2, 2024
d115b44
Merge branch 'main' into options_flow2
denpamusic Nov 8, 2024
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
11 changes: 10 additions & 1 deletion custom_components/plum_ecomax/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@

PLATFORMS: list[Platform] = [
Platform.BINARY_SENSOR,
Platform.BUTTON,
Platform.CLIMATE,
Platform.NUMBER,
Platform.SELECT,
Expand Down Expand Up @@ -102,6 +101,16 @@ async def _async_close_connection(event: Event | None = None) -> None:
return True


async def async_reload_config(
hass: HomeAssistant, entry: ConfigEntry, connection: EcomaxConnection
) -> None:
"""Reload config on update."""
data = dict(entry.data)
data[CONF_SUB_DEVICES] = await async_get_sub_devices(connection.device)
hass.config_entries.async_update_entry(entry, data=data)
await hass.config_entries.async_reload(entry.entry_id)


@callback
def async_setup_events(hass: HomeAssistant, connection: EcomaxConnection) -> bool:
"""Set up the ecoMAX events."""
Expand Down
71 changes: 0 additions & 71 deletions custom_components/plum_ecomax/button.py

This file was deleted.

2 changes: 1 addition & 1 deletion custom_components/plum_ecomax/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ async def async_update_preset_mode(self, mode: int) -> None: ...
@overload
async def async_update_preset_mode(self, mode: ThermostatNumber) -> None: ...

async def async_update_preset_mode(self, mode: ThermostatNumber | int) -> None:
async def async_update_preset_mode(self, mode: Any) -> None:
"""Update preset mode."""
if isinstance(mode, ThermostatNumber):
mode = int(mode.value)
Expand Down
Loading
Loading