From 048e16d93b7d97fb26ad700ea6acfaa37b85bb7d Mon Sep 17 00:00:00 2001 From: ccostan Date: Mon, 12 Mar 2018 16:04:59 -0400 Subject: [PATCH] Steve Test --- config/.HA_VERSION | 2 +- .../binary_sensor/skybell.py | 97 ------------------ config/packages/skybellhd.yaml | 2 +- .../floorplan/images/branding/Bearicon.png | Bin 0 -> 997 bytes 4 files changed, 2 insertions(+), 99 deletions(-) delete mode 100755 config/custom_components/binary_sensor/skybell.py create mode 100755 config/www/custom_ui/floorplan/images/branding/Bearicon.png diff --git a/config/.HA_VERSION b/config/.HA_VERSION index c49d7f91..a9ca1dcc 100755 --- a/config/.HA_VERSION +++ b/config/.HA_VERSION @@ -1 +1 @@ -0.64.3 \ No newline at end of file +0.65.2 \ No newline at end of file diff --git a/config/custom_components/binary_sensor/skybell.py b/config/custom_components/binary_sensor/skybell.py deleted file mode 100755 index 05e676d2..00000000 --- a/config/custom_components/binary_sensor/skybell.py +++ /dev/null @@ -1,97 +0,0 @@ -""" -Binary sensor support for the Skybell HD Doorbell. - -For more details about this platform, please refer to the documentation at -https://home-assistant.io/components/binary_sensor.skybell/ -""" -from datetime import timedelta -import logging - -import voluptuous as vol - -from homeassistant.components.binary_sensor import ( - BinarySensorDevice, PLATFORM_SCHEMA) -from homeassistant.components.skybell import ( - DEFAULT_ENTITY_NAMESPACE, DOMAIN as SKYBELL_DOMAIN, SkybellDevice) -from homeassistant.const import ( - CONF_ENTITY_NAMESPACE, CONF_MONITORED_CONDITIONS) -import homeassistant.helpers.config_validation as cv - -DEPENDENCIES = ['skybell'] - -_LOGGER = logging.getLogger(__name__) - -SCAN_INTERVAL = timedelta(seconds=5) - -# Sensor types: Name, device_class, event -SENSOR_TYPES = { - 'button': ['Button', 'occupancy', 'device:sensor:button'], - 'motion': ['Motion', 'motion', 'device:sensor:motion'], -} - -PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({ - vol.Optional(CONF_ENTITY_NAMESPACE, default=DEFAULT_ENTITY_NAMESPACE): - cv.string, - vol.Required(CONF_MONITORED_CONDITIONS, default=[]): - vol.All(cv.ensure_list, [vol.In(SENSOR_TYPES)]), -}) - - -def setup_platform(hass, config, add_devices, discovery_info=None): - """Set up the platform for a Skybell device.""" - skybell = hass.data.get(SKYBELL_DOMAIN) - - sensors = [] - for sensor_type in config.get(CONF_MONITORED_CONDITIONS): - for device in skybell.get_devices(): - sensors.append(SkybellBinarySensor(device, sensor_type)) - - add_devices(sensors, True) - - -class SkybellBinarySensor(SkybellDevice, BinarySensorDevice): - """A binary sensor implementation for Skybell devices.""" - - def __init__(self, device, sensor_type): - """Initialize a binary sensor for a Skybell device.""" - super().__init__(device) - self._sensor_type = sensor_type - self._name = "{0} {1}".format(self._device.name, - SENSOR_TYPES[self._sensor_type][0]) - self._device_class = SENSOR_TYPES[self._sensor_type][1] - self._event = {} - self._state = None - - @property - def name(self): - """Return the name of the sensor.""" - return self._name - - @property - def is_on(self): - """Return True if the binary sensor is on.""" - return self._state - - @property - def device_class(self): - """Return the class of the binary sensor.""" - return self._device_class - - @property - def device_state_attributes(self): - """Return the state attributes.""" - attrs = super().device_state_attributes - -# attrs['event_date'] = self._event.get('createdAt') - - return attrs - - def update(self): - """Get the latest data and updates the state.""" - super().update() - - event = self._device.latest(SENSOR_TYPES[self._sensor_type][2]) - - self._state = bool(event and event.get('id') != self._event.get('id')) - - self._event = event diff --git a/config/packages/skybellhd.yaml b/config/packages/skybellhd.yaml index 7d998a78..b654f2c0 100755 --- a/config/packages/skybellhd.yaml +++ b/config/packages/skybellhd.yaml @@ -50,7 +50,7 @@ sensor: switch: - platform: skybell monitored_conditions: - - do_not_disturb +# - do_not_disturb - motion_sensor ################################### diff --git a/config/www/custom_ui/floorplan/images/branding/Bearicon.png b/config/www/custom_ui/floorplan/images/branding/Bearicon.png new file mode 100755 index 0000000000000000000000000000000000000000..5ec9092494e4f9ad017a883b647373ab482a506e GIT binary patch literal 997 zcmVpsknX4C!G6D|FH}_k_qztZ28O->J3s*y z5$(%+kg9+cIs+!aRU-cqSOJSvWjZTh1|zE-DWIwoU_rX6bVUhdBC={5IBXlBsx#n;(+Q8|^<;TBqHzaQbphOeoLos*ibxiE z8Qg&j5gy>)%HoAr0lRgVAiTqU$efN$$U5xPDWpokkGf;OQ^1DGE&UwUWm|`j%oimv zu7=nzwE;8IgnzMfSHAeIs$*bEf3v)@d?xO}VFzr6EfR<>F^T83ZJ_0`AY3cO;?8C4 zsuSl4gq9+b#Rv~znT~0trT0|!8!;WE1O6liocOs&02eOWn%Y-=x zh{zUW%MQ=L98(9y?oI}8PTX}RXR&4zf{5g*y2bPb?`YX*nA7a^6M#Wc6hb%iSz`*V zC2}?a5MIL-UGX%NHwP-J$EX&k|!Q!f{kta$FW~2qdNe4IfGo8M!F5@-P9T{m%$u zO?A8P-7Wo3D^~E9$QC_`odXN73fQ`Qb4FphV)Id_66Zqh{u~sr8m&EpFAeKzCs!}# zrueh!rJ$siZ{8_jV|jKuc{<~$CqF8uZC0J1N}>*!`>vdVH#8S?!2u1oG{J_(PFQ}D zKwXe_#RLZ>&S_5bw!Y!tzh;GlV~;sao>*gUVOoWU|LIeMI{w;^J$yLl=Qe);lE0Aw TXpCC*00000NkvXXu0mjfX9mI# literal 0 HcmV?d00001