1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Renamed device to resource

This commit is contained in:
theolind
2015-03-07 15:22:03 +01:00
parent 19964e914a
commit 97258747c7
2 changed files with 7 additions and 7 deletions

View File

@@ -29,13 +29,13 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
""" Sets up the sensors """
devices = []
for device in config['devices']:
if 'arg' not in device:
device['arg'] = ''
if device['type'] not in sensor_types:
_LOGGER.error('Sensor type: "%s" does not exist', device['type'])
for resurce in config['resources']:
if 'arg' not in resurce:
resurce['arg'] = ''
if resurce['type'] not in sensor_types:
_LOGGER.error('Sensor type: "%s" does not exist', resurce['type'])
else:
devices.append(SystemMonitorSensor(device['type'], device['arg']))
devices.append(SystemMonitorSensor(resurce['type'], resurce['arg']))
add_devices(devices)