Skip to content

Commit

Permalink
Update rova component with suffix for house number (#21182)
Browse files Browse the repository at this point in the history
* Update rova component with release rova release 0.1.0
Add house_number_suffix to configuration

* Set default value for house_number_suffix
  • Loading branch information
GidoHakvoort authored and cgarwood committed Feb 21, 2019
1 parent 0969214 commit e764d94
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions homeassistant/components/sensor/rova.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@
from homeassistant.helpers.entity import Entity
from homeassistant.util import Throttle

REQUIREMENTS = ['rova==0.0.2']
REQUIREMENTS = ['rova==0.1.0']

# Config for rova requests.
CONF_ZIP_CODE = 'zip_code'
CONF_HOUSE_NUMBER = 'house_number'
CONF_HOUSE_NUMBER_SUFFIX = 'house_number_suffix'

UPDATE_DELAY = timedelta(hours=12)
SCAN_INTERVAL = timedelta(hours=12)
Expand All @@ -37,6 +38,7 @@
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
vol.Required(CONF_ZIP_CODE): cv.string,
vol.Required(CONF_HOUSE_NUMBER): cv.string,
vol.Optional(CONF_HOUSE_NUMBER_SUFFIX, default=''): cv.string,
vol.Optional(CONF_NAME, default='Rova'): cv.string,
vol.Optional(CONF_MONITORED_CONDITIONS, default=['bio']):
vol.All(cv.ensure_list, [vol.In(SENSOR_TYPES)])
Expand All @@ -52,10 +54,11 @@ def setup_platform(hass, config, add_entities, discovery_info=None):

zip_code = config[CONF_ZIP_CODE]
house_number = config[CONF_HOUSE_NUMBER]
house_number_suffix = config[CONF_HOUSE_NUMBER_SUFFIX]
platform_name = config[CONF_NAME]

# Create new Rova object to retrieve data
api = Rova(zip_code, house_number)
api = Rova(zip_code, house_number, house_number_suffix)

try:
if not api.is_rova_area():
Expand Down
2 changes: 1 addition & 1 deletion requirements_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,7 @@ rocketchat-API==0.6.1
roombapy==1.3.1

# homeassistant.components.sensor.rova
rova==0.0.2
rova==0.1.0

# homeassistant.components.switch.rpi_rf
# rpi-rf==0.9.7
Expand Down

0 comments on commit e764d94

Please sign in to comment.