The Solar of Things integration now supports full control of your solar system settings through Home Assistant. You can adjust battery limits, change operating modes, and control grid interactions directly from your dashboard or automations.
Entity: number.solar_station_xxxxx_battery_charge_limit
# Set battery charge limit to 90%
service: number.set_value
target:
entity_id: number.solar_station_xxxxx_battery_charge_limit
data:
value: 90
Entity: number.solar_station_xxxxx_battery_discharge_limit
# Don't discharge below 20%
service: number.set_value
target:
entity_id: number.solar_station_xxxxx_battery_discharge_limit
data:
value: 20
Entity: number.solar_station_xxxxx_grid_charge_limit
# Allow 2000W grid charging
service: number.set_value
target:
entity_id: number.solar_station_xxxxx_grid_charge_limit
data:
value: 2000
Entity: select.solar_station_xxxxx_operating_mode
# Switch to Time-of-Use mode
service: select.select_option
target:
entity_id: select.solar_station_xxxxx_operating_mode
data:
option: "Time-of-Use"
Entity: select.solar_station_xxxxx_battery_priority
# Prioritize solar energy
service: select.select_option
target:
entity_id: select.solar_station_xxxxx_battery_priority
data:
option: "Solar First"
Entity: switch.solar_station_xxxxx_grid_charging
# Enable grid charging
service: switch.turn_on
target:
entity_id: switch.solar_station_xxxxx_grid_charging
Entity: switch.solar_station_xxxxx_grid_feed_in
# Disable grid export
service: switch.turn_off
target:
entity_id: switch.solar_station_xxxxx_grid_feed_in
Entity: switch.solar_station_xxxxx_backup_mode
# Enable backup reserve
service: switch.turn_on
target:
entity_id: switch.solar_station_xxxxx_backup_mode
Charge from grid during cheap hours, discharge during peak hours:
automation:
# Charge from grid during cheap period (midnight-6am)
- alias: "Solar: Charge from Grid (Off-Peak)"
trigger:
- platform: time
at: "00:00:00"
action:
- service: switch.turn_on
target:
entity_id: switch.solar_station_xxxxx_grid_charging
- service: number.set_value
target:
entity_id: number.solar_station_xxxxx_grid_charge_limit
data:
value: 3000 # 3kW charging
# Stop grid charging after cheap period
- alias: "Solar: Stop Grid Charging (Peak)"
trigger:
- platform: time
at: "06:00:00"
action:
- service: switch.turn_off
target:
entity_id: switch.solar_station_xxxxx_grid_charging
- service: number.set_value
target:
entity_id: number.solar_station_xxxxx_grid_charge_limit
data:
value: 0
Adjust battery limits based on weather forecast:
automation:
- alias: "Solar: Adjust for Cloudy Weather"
trigger:
- platform: state
entity_id: weather.home
attribute: condition
to: "cloudy"
action:
# Lower discharge limit on cloudy days
- service: number.set_value
target:
entity_id: number.solar_station_xxxxx_battery_discharge_limit
data:
value: 40 # Keep 40% reserve
# Enable grid charging if needed
- service: switch.turn_on
target:
entity_id: switch.solar_station_xxxxx_grid_charging
- alias: "Solar: Adjust for Sunny Weather"
trigger:
- platform: state
entity_id: weather.home
attribute: condition
to: "sunny"
action:
# Normal discharge limit on sunny days
- service: number.set_value
target:
entity_id: number.solar_station_xxxxx_battery_discharge_limit
data:
value: 10
# Disable grid charging (solar is sufficient)
- service: switch.turn_off
target:
entity_id: switch.solar_station_xxxxx_grid_charging
Prepare for storms or power outages:
automation:
- alias: "Solar: Storm Preparation"
trigger:
- platform: state
entity_id: sensor.weather_alert
to: "storm_warning"
action:
# Enable backup mode
- service: switch.turn_on
target:
entity_id: switch.solar_station_xxxxx_backup_mode
# Set high charge limit
- service: number.set_value
target:
entity_id: number.solar_station_xxxxx_battery_charge_limit
data:
value: 100
# Set high discharge limit (preserve battery)
- service: number.set_value
target:
entity_id: number.solar_station_xxxxx_battery_discharge_limit
data:
value: 50
# Enable grid charging to top up
- service: switch.turn_on
target:
entity_id: switch.solar_station_xxxxx_grid_charging
# Notify user
- service: notify.mobile_app
data:
title: "Solar System: Storm Preparation"
message: "Battery is being prepared for potential outage"
Switch modes based on electricity prices:
automation:
- alias: "Solar: Peak Price Mode"
trigger:
- platform: numeric_state
entity_id: sensor.electricity_price
above: 0.25 # High price threshold
action:
- service: select.select_option
target:
entity_id: select.solar_station_xxxxx_operating_mode
data:
option: "Time-of-Use"
# Maximize battery usage during peak
- service: select.select_option
target:
entity_id: select.solar_station_xxxxx_battery_priority
data:
option: "Battery First"
- alias: "Solar: Off-Peak Mode"
trigger:
- platform: numeric_state
entity_id: sensor.electricity_price
below: 0.10 # Low price threshold
action:
- service: select.select_option
target:
entity_id: select.solar_station_xxxxx_operating_mode
data:
option: "Self-Use"
# Prioritize solar during off-peak
- service: select.select_option
target:
entity_id: select.solar_station_xxxxx_battery_priority
data:
option: "Solar First"
Extend battery life with charge cycling:
automation:
- alias: "Solar: Weekly Battery Calibration"
trigger:
- platform: time
at: "02:00:00"
condition:
- condition: time
weekday:
- sun # Every Sunday
action:
# Full charge cycle
- service: number.set_value
target:
entity_id: number.solar_station_xxxxx_battery_charge_limit
data:
value: 100
- delay:
hours: 6
# Return to normal (90% max)
- service: number.set_value
target:
entity_id: number.solar_station_xxxxx_battery_charge_limit
data:
value: 90
type: entities
title: Solar System Controls
entities:
- entity: select.solar_station_xxxxx_operating_mode
name: Operating Mode
- entity: select.solar_station_xxxxx_battery_priority
name: Battery Priority
- type: divider
- entity: number.solar_station_xxxxx_battery_charge_limit
name: Charge Limit
- entity: number.solar_station_xxxxx_battery_discharge_limit
name: Discharge Limit
- entity: number.solar_station_xxxxx_grid_charge_limit
name: Grid Charge Power
- type: divider
- entity: switch.solar_station_xxxxx_grid_charging
name: Grid Charging
- entity: switch.solar_station_xxxxx_grid_feed_in
name: Grid Feed-In
- entity: switch.solar_station_xxxxx_backup_mode
name: Backup Mode
type: vertical-stack
cards:
- type: gauge
entity: sensor.solar_station_xxxxx_battery_state_of_charge
name: Battery Level
min: 0
max: 100
needle: true
segments:
- from: 0
color: "#db4437"
- from: 20
color: "#ff9800"
- from: 50
color: "#ffc107"
- from: 80
color: "#0f9d58"
- type: entities
title: Battery Controls
entities:
- entity: number.solar_station_xxxxx_battery_charge_limit
name: Max Charge
- entity: number.solar_station_xxxxx_battery_discharge_limit
name: Min Discharge
- entity: switch.solar_station_xxxxx_backup_mode
name: Backup Reserve
type: horizontal-stack
cards:
- type: button
name: Self-Use Mode
icon: mdi:solar-power
tap_action:
action: call-service
service: select.select_option
target:
entity_id: select.solar_station_xxxxx_operating_mode
data:
option: "Self-Use"
- type: button
name: Backup Mode
icon: mdi:battery-lock
tap_action:
action: call-service
service: switch.turn_on
target:
entity_id: switch.solar_station_xxxxx_backup_mode
- type: button
name: Grid Export
icon: mdi:transmission-tower-export
tap_action:
action: call-service
service: switch.toggle
target:
entity_id: switch.solar_station_xxxxx_grid_feed_in
Note: The control API endpoints (/api/device/settings/v1 and /api/device/settings/update/v1) are assumed endpoints based on common IoT patterns. You will need to:
To find the real control endpoints:
Then update api.py with the correct endpoints and formats.
⚠️ Always test control features carefully:
Some settings may require:
Check your Solar of Things account permissions.
You can customize available options by editing the integration files:
Operating Modes (select.py):
OPERATING_MODES = [
"Self-Use",
"Time-of-Use",
"Backup",
"Grid-Tie",
"Off-Grid",
# Add more modes here
]
Battery Priority (select.py):
BATTERY_PRIORITY_MODES = [
"Solar First",
"Battery First",
"Grid First",
# Add more priorities here
]
script:
solar_storm_mode:
alias: "Solar: Storm Mode"
sequence:
- service: switch.turn_on
target:
entity_id: switch.solar_station_xxxxx_backup_mode
- service: number.set_value
target:
entity_id: number.solar_station_xxxxx_battery_discharge_limit
data:
value: 50
- service: switch.turn_on
target:
entity_id: switch.solar_station_xxxxx_grid_charging
- service: notify.mobile_app
data:
message: "Solar system in storm protection mode"
solar_normal_mode:
alias: "Solar: Normal Mode"
sequence:
- service: switch.turn_off
target:
entity_id: switch.solar_station_xxxxx_backup_mode
- service: number.set_value
target:
entity_id: number.solar_station_xxxxx_battery_discharge_limit
data:
value: 10
- service: select.select_option
target:
entity_id: select.solar_station_xxxxx_operating_mode
data:
option: "Self-Use"
scene:
- name: Solar Economy Mode
entities:
select.solar_station_xxxxx_operating_mode: "Time-of-Use"
select.solar_station_xxxxx_battery_priority: "Grid First"
switch.solar_station_xxxxx_grid_feed_in: "on"
- name: Solar Backup Mode
entities:
select.solar_station_xxxxx_operating_mode: "Backup"
switch.solar_station_xxxxx_backup_mode: "on"
number.solar_station_xxxxx_battery_discharge_limit: 50
Full control of your solar system is now at your fingertips! 🎉