mirror of
https://github.com/home-assistant/core.git
synced 2025-05-03 13:39:16 +00:00

* Remove dependencies and requirements * Revert "Remove dependencies and requirements" This reverts commit fe7171b4cd30889bad5adc9a4fd60059d05ba5a7. * Remove dependencies and requirements * Revert "Remove dependencies and requirements" This reverts commit 391355ee2cc53cbe6954f940062b18ae34b05621. * Remove dependencies and requirements * Fix flake8 complaints * Fix more flake8 complaints * Revert non-component removals
28 lines
699 B
Python
28 lines
699 B
Python
"""Support for Fibaro scenes."""
|
|
import logging
|
|
|
|
from homeassistant.components.scene import Scene
|
|
|
|
from . import FIBARO_DEVICES, FibaroDevice
|
|
|
|
_LOGGER = logging.getLogger(__name__)
|
|
|
|
|
|
async def async_setup_platform(hass, config, async_add_entities,
|
|
discovery_info=None):
|
|
"""Perform the setup for Fibaro scenes."""
|
|
if discovery_info is None:
|
|
return
|
|
|
|
async_add_entities(
|
|
[FibaroScene(scene)
|
|
for scene in hass.data[FIBARO_DEVICES]['scene']], True)
|
|
|
|
|
|
class FibaroScene(FibaroDevice, Scene):
|
|
"""Representation of a Fibaro scene entity."""
|
|
|
|
def activate(self):
|
|
"""Activate the scene."""
|
|
self.fibaro_device.start()
|