Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.enphase_envoy.switch Namespace Reference

Classes

class  EnvoyDryContactSwitchEntity
 
class  EnvoyDryContactSwitchEntityDescription
 
class  EnvoyEnpowerSwitchEntity
 
class  EnvoyEnpowerSwitchEntityDescription
 
class  EnvoyStorageSettingsSwitchEntity
 
class  EnvoyStorageSettingsSwitchEntityDescription
 

Functions

None async_setup_entry (HomeAssistant hass, EnphaseConfigEntry config_entry, AddEntitiesCallback async_add_entities)
 

Variables

 CHARGE_FROM_GRID_SWITCH
 
 ENPOWER_GRID_SWITCH
 
 RELAY_STATE_SWITCH
 

Detailed Description

Switch platform for Enphase Envoy solar energy monitor.

Function Documentation

◆ async_setup_entry()

None homeassistant.components.enphase_envoy.switch.async_setup_entry ( HomeAssistant  hass,
EnphaseConfigEntry  config_entry,
AddEntitiesCallback  async_add_entities 
)
Set up Enphase Envoy switch platform.

Definition at line 75 of file switch.py.

Variable Documentation

◆ CHARGE_FROM_GRID_SWITCH

homeassistant.components.enphase_envoy.switch.CHARGE_FROM_GRID_SWITCH
Initial value:
1 = EnvoyStorageSettingsSwitchEntityDescription(
2  key="charge_from_grid",
3  translation_key="charge_from_grid",
4  value_fn=lambda storage_settings: storage_settings.charge_from_grid,
5  turn_on_fn=lambda envoy: envoy.enable_charge_from_grid(),
6  turn_off_fn=lambda envoy: envoy.disable_charge_from_grid(),
7 )

Definition at line 66 of file switch.py.

◆ ENPOWER_GRID_SWITCH

homeassistant.components.enphase_envoy.switch.ENPOWER_GRID_SWITCH
Initial value:
1 = EnvoyEnpowerSwitchEntityDescription(
2  key="mains_admin_state",
3  translation_key="grid_enabled",
4  value_fn=lambda enpower: enpower.mains_admin_state == "closed",
5  turn_on_fn=lambda envoy: envoy.go_on_grid(),
6  turn_off_fn=lambda envoy: envoy.go_off_grid(),
7 )

Definition at line 51 of file switch.py.

◆ RELAY_STATE_SWITCH

homeassistant.components.enphase_envoy.switch.RELAY_STATE_SWITCH
Initial value:
1 = EnvoyDryContactSwitchEntityDescription(
2  key="relay_status",
3  value_fn=lambda dry_contact: dry_contact.status == DryContactStatus.CLOSED,
4  turn_on_fn=lambda envoy, id: envoy.close_dry_contact(id),
5  turn_off_fn=lambda envoy, id: envoy.open_dry_contact(id),
6 )

Definition at line 59 of file switch.py.