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

Update pyhomematic to 0.1.53 #19056

Merged
merged 1 commit into from
Dec 6, 2018
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
18 changes: 14 additions & 4 deletions homeassistant/components/homematic/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@

from homeassistant.const import (
ATTR_ENTITY_ID, ATTR_NAME, CONF_HOST, CONF_HOSTS, CONF_PASSWORD,
CONF_PLATFORM, CONF_USERNAME, EVENT_HOMEASSISTANT_STOP, STATE_UNKNOWN)
CONF_PLATFORM, CONF_USERNAME, CONF_SSL, CONF_VERIFY_SSL,
EVENT_HOMEASSISTANT_STOP, STATE_UNKNOWN)
from homeassistant.helpers import discovery
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entity import Entity

REQUIREMENTS = ['pyhomematic==0.1.52']
REQUIREMENTS = ['pyhomematic==0.1.53']

_LOGGER = logging.getLogger(__name__)

Expand Down Expand Up @@ -77,7 +78,8 @@
'IPSmoke', 'RFSiren', 'PresenceIP', 'IPAreaThermostat',
'IPWeatherSensor', 'RotaryHandleSensorIP', 'IPPassageSensor',
'IPKeySwitchPowermeter', 'IPThermostatWall230V', 'IPWeatherSensorPlus',
'IPWeatherSensorBasic', 'IPBrightnessSensor', 'IPGarage'],
'IPWeatherSensorBasic', 'IPBrightnessSensor', 'IPGarage',
'UniversalSensor'],
DISCOVER_CLIMATE: [
'Thermostat', 'ThermostatWall', 'MAXThermostat', 'ThermostatWall2',
'MAXWallThermostat', 'IPThermostat', 'IPThermostatWall',
Expand Down Expand Up @@ -173,14 +175,17 @@
DEFAULT_PATH = ''
DEFAULT_USERNAME = 'Admin'
DEFAULT_PASSWORD = ''
DEFAULT_SSL = False
DEFAULT_VERIFY_SSL = False
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should default verify to True.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although I generally agree, for this case (and comparable ones) it wouldn't make sense to verify by default. The reason is, that the CCU-device never is a cloud device, it's always on premise. It can be exposed to the web, but that's a really bad idea. So typically nobody does that. And it's unrealistic, that people will use trusted certificates for a machine that's only local. They might have their custom CA. But last time I checked I couldn't make Home Assistant use a custom CA (virtualenv).
So essentially: having verify_ssl with True as default will be a broken-by-default configuration.

DEFAULT_CHANNEL = 1


DEVICE_SCHEMA = vol.Schema({
vol.Required(CONF_PLATFORM): 'homematic',
vol.Required(ATTR_NAME): cv.string,
vol.Required(ATTR_ADDRESS): cv.string,
vol.Required(ATTR_INTERFACE): cv.string,
vol.Optional(ATTR_CHANNEL, default=1): vol.Coerce(int),
vol.Optional(ATTR_CHANNEL, default=DEFAULT_CHANNEL): vol.Coerce(int),
vol.Optional(ATTR_PARAM): cv.string,
vol.Optional(ATTR_UNIQUE_ID): cv.string,
})
Expand All @@ -198,6 +203,9 @@
vol.Optional(CONF_PASSWORD, default=DEFAULT_PASSWORD): cv.string,
vol.Optional(CONF_CALLBACK_IP): cv.string,
vol.Optional(CONF_CALLBACK_PORT): cv.port,
vol.Optional(CONF_SSL, default=DEFAULT_SSL): cv.boolean,
vol.Optional(
CONF_VERIFY_SSL, default=DEFAULT_VERIFY_SSL): cv.boolean,
}},
vol.Optional(CONF_HOSTS, default={}): {cv.match_all: {
vol.Required(CONF_HOST): cv.string,
Expand Down Expand Up @@ -268,6 +276,8 @@ def setup(hass, config):
'password': rconfig.get(CONF_PASSWORD),
'callbackip': rconfig.get(CONF_CALLBACK_IP),
'callbackport': rconfig.get(CONF_CALLBACK_PORT),
'ssl': rconfig.get(CONF_SSL),
'verify_ssl': rconfig.get(CONF_VERIFY_SSL),
'connect': True,
}

Expand Down
2 changes: 1 addition & 1 deletion requirements_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -978,7 +978,7 @@ pyhik==0.1.8
pyhiveapi==0.2.14

# homeassistant.components.homematic
pyhomematic==0.1.52
pyhomematic==0.1.53

# homeassistant.components.sensor.hydroquebec
pyhydroquebec==2.2.2
Expand Down
2 changes: 1 addition & 1 deletion requirements_test_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ pydeconz==47
pydispatcher==2.0.5

# homeassistant.components.homematic
pyhomematic==0.1.52
pyhomematic==0.1.53

# homeassistant.components.litejet
pylitejet==0.1
Expand Down