Skip to content

Commit

Permalink
Merge pull request #17 from RobertD502/master
Browse files Browse the repository at this point in the history
Change IOCare to IoCare & update README
  • Loading branch information
sarahhenkens authored Apr 1, 2021
2 parents 1d0fc7d + a8ab9d0 commit 4c894f0
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 21 deletions.
19 changes: 15 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,25 @@
# Coway IOCare
# Coway IoCare
[![hacs_badge](https://img.shields.io/badge/HACS-Custom-orange.svg)](https://github.com/custom-components/hacs) ![LGTM Grade](https://img.shields.io/lgtm/grade/python/github/sarahhenkens/home-assistant-iocare) ![GitHub manifest version (path)](https://img.shields.io/github/manifest-json/v/sarahhenkens/home-assistant-iocare?filename=custom_components%2Fcoway%2Fmanifest.json) ![GitHub all releases](https://img.shields.io/github/downloads/sarahhenkens/home-assistant-iocare/total?color=green)

Custom component for Home Assistant Core for monitoring and controlling
Coway / Airmega air purifiers.

**Breaking Change 2021.4.0**

The recent update of home-assistant-iocare to `2021.4.0` uses a new domain. If you previously installed any version prior to `2021.4.0`, you will need to delete the integration from the integrations page in Home Assistant. Due to the new domain name, previous integrations will fail to work.
1. Delete your current IOCare Integration from the Home Assistant Integrations page
1. If you updated prior to deleting the integration, delete the integration, restart Home Assistant, and proceed to step 4
2. Update home-assistant-iocare via HACS or manually
3. Restart Home Assistant
4. Initiate Config Flow by navigating to Configuration > Integrations > click the "+" button > find "Coway IoCare"
5. Enter your Coway IoCare credentials

## Installation

### With HACS
1. Open HACS Settings and add this repository (https://github.com/sarahhenkens/home-assistant-iocare)
as a Custom Repository (use **Integration** as the category).
2. The `Coway IOCare` page should automatically load (or find it in the HACS Store)
2. The `Coway IoCare` page should automatically load (or find it in the HACS Store)
3. Click `Install`

### Manual
Expand All @@ -18,5 +29,5 @@ and place inside your Home Assistant Core installation's `custom_components` dir

## Setup
1. Install this integration.
2. Use Config Flow to configure the integration with your Coway IOCare credentials.
* Initiate Config Flow by navigating to Configuration > Integrations > click the "+" button > find "Coway IOCare" (restart Home Assistant and / or clear browser cache if you can't find it)
2. Use Config Flow to configure the integration with your Coway IoCare credentials.
* Initiate Config Flow by navigating to Configuration > Integrations > click the "+" button > find "Coway IoCare" (restart Home Assistant and / or clear browser cache if you can't find it)
4 changes: 2 additions & 2 deletions custom_components/coway/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Support for Coway IOCare"""
"""Support for Coway IoCare"""
import asyncio
import logging
import voluptuous as vol
Expand All @@ -24,7 +24,7 @@ def setup(hass, config):


async def async_setup_entry(hass, config_entry):
"""Set up IOCare integration from a config entry."""
"""Set up IoCare integration from a config entry."""
username = config_entry.data.get(CONF_USERNAME)
password = config_entry.data.get(CONF_PASSWORD)

Expand Down
4 changes: 2 additions & 2 deletions custom_components/coway/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class IoCareConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
CONNECTION_CLASS = config_entries.CONN_CLASS_CLOUD_POLL

def __init__(self):
"""Initialize IOCare configuration flow"""
"""Initialize IoCare configuration flow"""
self.schema = vol.Schema({
vol.Required(CONF_USERNAME): str,
vol.Required(CONF_PASSWORD): str
Expand Down Expand Up @@ -51,7 +51,7 @@ async def _async_iocare_login(self):
await self.hass.async_add_executor_job(client.check_access_token)

except Exception:
_LOGGER.error("Unable to connect to IOCare: Failed to Log In")
_LOGGER.error("Unable to connect to IoCare: Failed to Log In")
errors = {"base": "auth_error"}

if errors:
Expand Down
2 changes: 1 addition & 1 deletion custom_components/coway/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"domain": "coway",
"name": "Coway IOCare",
"name": "Coway IoCare",
"version": "2021.4.0",
"config_flow": true,
"requirements": ["git+https://github.com/RobertD502/python-iocare@master#python-iocare==0.1.6"],
Expand Down
12 changes: 6 additions & 6 deletions custom_components/coway/strings.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"config": {
"title": "Coway IOCare",
"title": "Coway IoCare",
"step": {
"user": {
"title": "Fill in your Coway IOCare credentials",
"title": "Fill in your Coway IoCare credentials",
"data": {
"username": "Coway Username",
"password": "Coway Password"
"username": "IoCare Username",
"password": "IoCare Password"
}
}
},
"error": {
"auth_error": "IOCare authentication failed. Are your credentials correct?"
"auth_error": "IoCare authentication failed. Are your credentials correct?"
},
"abort": {
"already_configured": "IOCare is already configured"
"already_configured": "IoCare is already configured"
}
}
}
12 changes: 6 additions & 6 deletions custom_components/coway/translations/en.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"config": {
"abort": {
"already_configured": "IOCare is already configured"
"already_configured": "IoCare is already configured"
},
"error": {
"auth_error": "IOCare authentication failed. Are your credentials correct?"
"auth_error": "IoCare authentication failed. Are your credentials correct?"
},
"step": {
"user": {
"data": {
"username": "Coway Username",
"password": "Coway Password"
"username": "IoCare Username",
"password": "IoCare Password"
},
"title": "Fill in your Coway IOCare credentials"
"title": "Fill in your Coway IoCare credentials"
}
},
"title": "Coway IOCare"
"title": "Coway IoCare"
}
}

0 comments on commit 4c894f0

Please sign in to comment.