diff --git a/source/_integrations/enphase_envoy.markdown b/source/_integrations/enphase_envoy.markdown index 40740524122c..a4f0906338a4 100644 --- a/source/_integrations/enphase_envoy.markdown +++ b/source/_integrations/enphase_envoy.markdown @@ -191,7 +191,12 @@ This integration provides several values suitable for the energy dashboard: ## Actions -Available actions are: `switch.turn_on`, `switch.turn_off`, `switch.toggle`, [`number.set_value`](#action-numberset_value), [`select.select`](#action-selectselect) +Available actions are: + +- `switch.turn_on`, `switch.turn_off`, `switch.toggle` +- [`number.set_value`](#action-numberset_value) +- [`select.select`](#action-selectselect) +- [`enphase_envoy.get_raw_tariff`](#action-enphase_envoyget_raw_tariff) ### Action `switch.turn_on`/`switch.turn_off`/`switch.toggle` @@ -274,6 +279,84 @@ data: Technically `select.first`, `select.last`, `select.previous`, `select.next` are available as well, but as there's no logical sequence in the values to select, their use is not advocated. {% endnote %} +### Action `enphase_envoy.get_raw_tariff` + +Each time this integration updates its entities, it collects data from a set of endpoints in the Envoy. That set of data is referred to as `raw`. It contains more information as strictly needed for entity data. The raw data is cached until the next collection cycle, when it is replaced by a fresh dataset from the envoy. + +The action `enphase_envoy.get_raw_tariff` returns tariff data from the `raw` data cache. To explore the cached tariff data use the [developer tools - actions](/docs/tools/dev-tools/#actions-tab) menu and use this action. + +| Data attribute | Optional | Description | +| - | - | - | +| `config_entry_id` | no | Config entry id of the target Envoy.
In the UI select an Envoy from the dropdown list.
When switching to yaml mode the config_entry_id shows as numeric.| + +Example with envoy entity: + +```yaml +action: enphase_envoy.get_raw_tariff +data: + config_entry_id: 01JFG9B5GQRWW4RPE5CTVFGNS7 +``` + +Response (partially) + +```yaml +{ + raw: + { + "tariff": { + "currency": { + "code": "EUR" + }, + "logger": "mylogger", + "date": "1695744220", + "storage_settings": { + "mode": "self-consumption", + "operation_mode_sub_type": "", + "reserved_soc": 15.0, + "very_low_soc": 5, + "charge_from_grid": true, + "date": "1695598084" + }, + "single_rate": { + "rate": 0.0, + "sell": 0.0 + }, +``` + +When used in automation or script actions, use `response_variable` to specify which variable will receive the returned data + +{% raw %} + +```yaml +alias: GetTariffSingleRate +description: Get tariff Single rate json from Cache +triggers: [] +conditions: [] +actions: + - action: enphase_envoy.get_raw_tariff + data: + config_entry_id: 01JFG9B5GQRWW4RPE5CTVFGNS7 + response_variable: tariff_data + - action: notify.persistent_notification + metadata: {} + data: + message: | + {{ tariff_data["raw"]["tariff"]["single_rate"]}} + title: Tariff data +mode: single +``` + +Result: + +```json +{"rate": 0.0, "sell": 0.0} + +``` + +In the Developer tools - actions, automation or script UI, this action shows as: _Enphase Envoy: Tariff details_. + +{% endraw %} + ## Know issues and limitations - [Envoy firmware](https://enphase.com/installers/resources/documentation/communication?&f[0]=document%3A217) versions come with changing behavior, features and issues. Firmware is pushed to the Envoy by Enphase, while 'not always communicated in detail upfront'. This may result in sudden changes in the Envoy behavior and is always accompanied by an outage while Envoy is being updated. diff --git a/source/images/integrations/enphase_envoy/enphase_envoy_action_getfirmware_dev_ui.png b/source/images/integrations/enphase_envoy/enphase_envoy_action_getfirmware_dev_ui.png new file mode 100644 index 000000000000..a8058482b90b Binary files /dev/null and b/source/images/integrations/enphase_envoy/enphase_envoy_action_getfirmware_dev_ui.png differ