From 97258747c789602b346a7dce2c07238f2b85a3cf Mon Sep 17 00:00:00 2001 From: theolind Date: Sat, 7 Mar 2015 15:22:03 +0100 Subject: [PATCH] Renamed device to resource --- config/configuration.yaml.example | 2 +- homeassistant/components/sensor/systemmonitor.py | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/config/configuration.yaml.example b/config/configuration.yaml.example index 1e42c836a33..fde4040863f 100644 --- a/config/configuration.yaml.example +++ b/config/configuration.yaml.example @@ -105,7 +105,7 @@ automation 2: sensor: platform: systemmonitor - devices: + resources: - {type: 'disk_use_percent', arg: '/'} - {type: 'disk_use_percent', arg: '/home'} - {type: 'disk_use', arg: '/home'} diff --git a/homeassistant/components/sensor/systemmonitor.py b/homeassistant/components/sensor/systemmonitor.py index f53c4c09a33..631610b09da 100644 --- a/homeassistant/components/sensor/systemmonitor.py +++ b/homeassistant/components/sensor/systemmonitor.py @@ -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)