Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeSG committed Apr 14, 2021
1 parent 977cae8 commit 320d231
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 17 deletions.
21 changes: 10 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@

This is a hard fork of [xMrVizzy/philips-airpurifier](https://github.com/xMrVizzy/philips-airpurifier).

`ha-philips-purifier_http` is a custom Home Assistant component that enables you to control your Philips Air Purifier devices.
This is a custom Home Assistant component that enables you to control your Philips Air Purifier devices.
For now, it supports only older models that use the HTTP protocol for communication. CoAP support comming soon. :)

## Installation


### Install manually

Download the `philips_airpurifier_http` folder from this repo and place it in your `custom_components` folder
Expand Down Expand Up @@ -49,7 +48,7 @@ Set the device mode (if supported)
| entity_id | `"fan.living_room"` | _Required_ | Name(s) of the entities to set mode |
| preset_mode | `"allergen"` | _Required_ | One of "auto", "allergen", "sleep", "bacteria", "night". |

### `philips_airpurifier.set_function`
### `philips_airpurifier_http.set_function`

Set the device function (if supported)

Expand All @@ -76,7 +75,7 @@ Set the device light brightness
| entity_id | `"fan.living_room"` | _Required_ | Name(s) of the entities to set light brightness |
| level | `50` | _Required_ | One of 0, 25, 50, 75, 100. Turns off the display light if level is 0. |

### `philips_airpurifier.set_child_lock`
### `philips_airpurifier_http.set_child_lock`

Set the device child lock on or off

Expand All @@ -85,7 +84,7 @@ Set the device child lock on or off
| entity_id | `"fan.living_room"` | _Required_ | Name(s) of the entities to set child lock |
| lock | `true` | _Required_ | true or false |

### `philips_airpurifier.set_timer`
### `philips_airpurifier_http.set_timer`

Set the device off time

Expand All @@ -94,7 +93,7 @@ Set the device off time
| entity_id | `"fan.living_room"` | _Required_ | Name(s) of the entities to set off timer |
| hours | `5` | _Required_ | Hours between 0 and 12 |

### `philips_airpurifier.set_display_light`
### `philips_airpurifier_http.set_display_light`

Set the device display light on or off

Expand All @@ -103,14 +102,14 @@ Set the device display light on or off
| entity_id | `"fan.living_room"` | _Required_ | Name(s) of the entities to set display light |
| light | `true` | _Required_ | true or false |

### `philips_airpurifier.set_used_index`
### `philips_airpurifier_http.set_used_index`

Sets the device used index(IAI or PM2.5)

| Field | Value | Necessity | Description |
| --------- | ------------------- | ---------- | -------------------------------------------- |
| entity_id | `"fan.living_room"` | _Required_ | Name(s) of the entities to set display light |
| used_index | `"IAI"` | _Required_ | One of "IAI" or "PM2.5". |
| Field | Value | Necessity | Description |
| ---------- | ------------------- | ---------- | -------------------------------------------- |
| entity_id | `"fan.living_room"` | _Required_ | Name(s) of the entities to set display light |
| used_index | `"IAI"` | _Required_ | One of "IAI" or "PM2.5". |

## Meta

Expand Down
2 changes: 1 addition & 1 deletion custom_components/philips_airpurifier_http/const.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
""" philips_airpurifier constants"""
""" philips_airpurifier_http constants"""

# Integration setup
DOMAIN = "philips_airpurifier_http"
Expand Down
5 changes: 1 addition & 4 deletions custom_components/philips_airpurifier_http/fan.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,6 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=
client = await hass.async_add_executor_job(
lambda: HTTPAirClient(config[CONF_HOST], False)
)
unique_id = None

wifi = await hass.async_add_executor_job(client.get_wifi)

device = PhilipsAirPurifierFan(hass, client, name)

Expand Down Expand Up @@ -349,7 +346,7 @@ async def async_set_preset_mode(self, preset_mode: str) -> None:
await self._async_set_values({PHILIPS_MODE: philips_mode})
else:
_LOGGER.warning('Unsupported preset mode "%s"', preset_mode)

async def async_set_used_index(self, used_index: str) -> None:
"""Set the used_index of the fan."""
philips_used_index = self._find_key(USED_INDEX_MAP, used_index)
Expand Down
2 changes: 1 addition & 1 deletion custom_components/philips_airpurifier_http/services.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# philips-airpurifier custom services.
# philips_airpurifier_http custom services.

set_function:
description: Set the device function (if supported)
Expand Down

0 comments on commit 320d231

Please sign in to comment.