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

renamed tahoma or Tahoma to TaHoma. #46

Merged
merged 2 commits into from
Jun 9, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
10 changes: 5 additions & 5 deletions custom_components/tahoma/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""The Tahoma integration."""
"""The TaHoma integration."""
import asyncio

import voluptuous as vol
Expand Down Expand Up @@ -48,12 +48,12 @@


async def async_setup(hass: HomeAssistant, config: dict):
"""Set up the Tahoma component."""
"""Set up the TaHoma component."""
return True


async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):
"""Set up Tahoma from a config entry."""
"""Set up TaHoma from a config entry."""

hass.data.setdefault(DOMAIN, {})

Expand All @@ -68,7 +68,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):

# TODO Add better exception handling
except RequestException:
_LOGGER.exception("Error when getting devices from the Tahoma API")
_LOGGER.exception("Error when getting devices from the TaHoma API")
return False

hass.data[DOMAIN][entry.entry_id] = {
Expand All @@ -87,7 +87,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):

else:
_LOGGER.warning(
"Unsupported Tahoma device (%s - %s - %s)",
"Unsupported TaHoma device (%s - %s - %s)",
_device.type,
_device.uiclass,
_device.widget,
Expand Down
6 changes: 3 additions & 3 deletions custom_components/tahoma/binary_sensor.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Support for Tahoma binary sensors."""
"""Support for TaHoma binary sensors."""
from datetime import timedelta
import logging

Expand All @@ -21,7 +21,7 @@


async def async_setup_entry(hass, entry, async_add_entities):
"""Set up the Tahoma sensors from a config entry."""
"""Set up the TaHoma sensors from a config entry."""

data = hass.data[DOMAIN][entry.entry_id]

Expand All @@ -36,7 +36,7 @@ async def async_setup_entry(hass, entry, async_add_entities):


class TahomaBinarySensor(TahomaDevice, BinarySensorEntity):
"""Representation of a Tahoma Binary Sensor."""
"""Representation of a TaHoma Binary Sensor."""

def __init__(self, tahoma_device, controller):
"""Initialize the sensor."""
Expand Down
6 changes: 3 additions & 3 deletions custom_components/tahoma/config_flow.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Config flow for Tahoma integration."""
"""Config flow for TaHoma integration."""
import logging

import voluptuous as vol
Expand Down Expand Up @@ -31,7 +31,7 @@ async def validate_input(hass: core.HomeAssistant, data):
controller = await hass.async_add_executor_job(TahomaApi, username, password)

except RequestException:
_LOGGER.exception("Error when trying to log in to the Tahoma API")
_LOGGER.exception("Error when trying to log in to the TaHoma API")
raise CannotConnect

# If you cannot connect:
Expand All @@ -44,7 +44,7 @@ async def validate_input(hass: core.HomeAssistant, data):


class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
"""Handle a config flow for Tahoma."""
"""Handle a config flow for TaHoma."""

VERSION = 1
CONNECTION_CLASS = config_entries.CONN_CLASS_CLOUD_POLL
Expand Down
8 changes: 4 additions & 4 deletions custom_components/tahoma/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
DEVICE_CLASS_OPENING
)

"""Constants for the Tahoma integration."""
"""Constants for the TaHoma integration."""

DOMAIN = "tahoma"
DOMAIN = "TaHoma"

# Used to map the Somfy uiClass to the Home Assistant platform
TAHOMA_TYPES = {
Expand Down Expand Up @@ -62,15 +62,15 @@
"ContactSensor": DEVICE_CLASS_OPENING
}

# Tahoma Attributes
# TaHoma Attributes
ATTR_MEM_POS = "memorized_position"
ATTR_RSSI_LEVEL = "rssi_level"
ATTR_LOCK_START_TS = "lock_start_ts"
ATTR_LOCK_END_TS = "lock_end_ts"
ATTR_LOCK_LEVEL = "lock_level"
ATTR_LOCK_ORIG = "lock_originator"

# Tahoma internal device states
# TaHoma internal device states
CORE_RSSI_LEVEL_STATE = "core:RSSILevelState"
CORE_STATUS_STATE = "core:StatusState"
CORE_CLOSURE_STATE = "core:ClosureState"
Expand Down
6 changes: 3 additions & 3 deletions custom_components/tahoma/cover.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Support for Tahoma cover - shutters etc."""
"""Support for TaHoma cover - shutters etc."""
from datetime import timedelta
import logging

Expand Down Expand Up @@ -51,7 +51,7 @@


async def async_setup_entry(hass, entry, async_add_entities):
"""Set up the Tahoma covers from a config entry."""
"""Set up the TaHoma covers from a config entry."""

data = hass.data[DOMAIN][entry.entry_id]

Expand All @@ -66,7 +66,7 @@ async def async_setup_entry(hass, entry, async_add_entities):


class TahomaCover(TahomaDevice, CoverEntity):
"""Representation a Tahoma Cover."""
"""Representation a TaHoma Cover."""

def __init__(self, tahoma_device, controller):
"""Initialize the device."""
Expand Down
4 changes: 2 additions & 2 deletions custom_components/tahoma/light.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Tahoma light platform that implements dimmable tahoma lights."""
"""TaHoma light platform that implements dimmable TaHoma lights."""
import logging
from datetime import timedelta

Expand All @@ -21,7 +21,7 @@


async def async_setup_entry(hass, entry, async_add_entities):
"""Set up the Tahoma lights from a config entry."""
"""Set up the TaHoma lights from a config entry."""

data = hass.data[DOMAIN][entry.entry_id]

Expand Down
6 changes: 3 additions & 3 deletions custom_components/tahoma/lock.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Support for Tahoma lock."""
"""Support for TaHoma lock."""
from datetime import timedelta
import logging

Expand All @@ -15,7 +15,7 @@


async def async_setup_entry(hass, entry, async_add_entities):
"""Set up the Tahoma locks from a config entry."""
"""Set up the TaHoma locks from a config entry."""

data = hass.data[DOMAIN][entry.entry_id]

Expand All @@ -30,7 +30,7 @@ async def async_setup_entry(hass, entry, async_add_entities):


class TahomaLock(TahomaDevice, LockEntity):
"""Representation a Tahoma lock."""
"""Representation a TaHoma lock."""

def __init__(self, tahoma_device, controller):
"""Initialize the device."""
Expand Down
4 changes: 2 additions & 2 deletions custom_components/tahoma/manifest.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"domain": "tahoma",
"domain": "TaHoma",
iMicknl marked this conversation as resolved.
Show resolved Hide resolved
"name": "Somfy TaHoma",
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/tahoma",
"documentation": "https://www.home-assistant.io/integrations/TaHoma",
"requirements": [],
"codeowners": ["@philklei", "@imicknl", "@vlebourl"]
}
6 changes: 3 additions & 3 deletions custom_components/tahoma/scene.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Support for Tahoma scenes."""
"""Support for TaHoma scenes."""
import logging
from typing import Any

Expand All @@ -10,7 +10,7 @@


async def async_setup_entry(hass, entry, async_add_entities):
"""Set up the Tahoma scenes from a config entry."""
"""Set up the TaHoma scenes from a config entry."""

data = hass.data[DOMAIN][entry.entry_id]

Expand All @@ -24,7 +24,7 @@ async def async_setup_entry(hass, entry, async_add_entities):


class TahomaScene(Scene):
"""Representation of a Tahoma scene entity."""
"""Representation of a TaHoma scene entity."""

def __init__(self, tahoma_scene, controller):
"""Initialize the scene."""
Expand Down
6 changes: 3 additions & 3 deletions custom_components/tahoma/sensor.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Support for Tahoma sensors."""
"""Support for TaHoma sensors."""
from datetime import timedelta
import logging

Expand All @@ -20,7 +20,7 @@


async def async_setup_entry(hass, entry, async_add_entities):
"""Set up the Tahoma sensors from a config entry."""
"""Set up the TaHoma sensors from a config entry."""

data = hass.data[DOMAIN][entry.entry_id]

Expand All @@ -35,7 +35,7 @@ async def async_setup_entry(hass, entry, async_add_entities):


class TahomaSensor(TahomaDevice, Entity):
"""Representation of a Tahoma Sensor."""
"""Representation of a TaHoma Sensor."""

def __init__(self, tahoma_device, controller):
"""Initialize the sensor."""
Expand Down
2 changes: 1 addition & 1 deletion custom_components/tahoma/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"config": {
"step": {
"user": {
"description": "Enter your tahoma credentials for the Tahoma App or the tahomalink.com platform.",
"description": "Enter your TaHoma credentials for the TaHoma App or the tahomalink.com platform.",
"data": {
"username": "[%key:common::config_flow::data::username%]",
"password": "[%key:common::config_flow::data::password%]"
Expand Down
6 changes: 3 additions & 3 deletions custom_components/tahoma/switch.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Support for Tahoma switches."""
"""Support for TaHoma switches."""
import logging

from homeassistant.components.switch import SwitchEntity
Expand All @@ -12,7 +12,7 @@


async def async_setup_entry(hass, entry, async_add_entities):
"""Set up the Tahoma sensors from a config entry."""
"""Set up the TaHoma sensors from a config entry."""

data = hass.data[DOMAIN][entry.entry_id]

Expand All @@ -27,7 +27,7 @@ async def async_setup_entry(hass, entry, async_add_entities):


class TahomaSwitch(TahomaDevice, SwitchEntity):
"""Representation a Tahoma Switch."""
"""Representation a TaHoma Switch."""

def __init__(self, tahoma_device, controller):
"""Initialize the switch."""
Expand Down
Loading