Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SolarEdge Local Component #23996

Merged
merged 13 commits into from Jun 5, 2019

Load all sensors by default

They use the same API endpoint.  This changes was made per home-assistant/architecture#244
  • Loading branch information...
drobtravels committed May 28, 2019
commit 930af174c0c5c2caf92c8450363d0d4b4c702156
@@ -12,7 +12,7 @@

from homeassistant.components.sensor import PLATFORM_SCHEMA
from homeassistant.const import (
CONF_IP_ADDRESS, CONF_MONITORED_CONDITIONS, CONF_NAME, POWER_WATT,
CONF_IP_ADDRESS, CONF_NAME, POWER_WATT,
ENERGY_WATT_HOUR)
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entity import Entity
@@ -37,8 +37,6 @@
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
vol.Required(CONF_IP_ADDRESS): cv.string,
vol.Optional(CONF_NAME, default='SolarEdge'): cv.string,
vol.Optional(CONF_MONITORED_CONDITIONS, default=['current_power']):
vol.All(cv.ensure_list, [vol.In(SENSOR_TYPES)])
})

_LOGGER = logging.getLogger(__name__)
@@ -74,7 +72,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):

# Create a new sensor for each sensor type.
entities = []
for sensor_key in config[CONF_MONITORED_CONDITIONS]:
for sensor_key in SENSOR_TYPES:
sensor = SolarEdgeSensor(platform_name, sensor_key, data)
entities.append(sensor)

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.