{"id":50379351,"url":"https://github.com/italoc/silla-prism-integration","last_synced_at":"2026-05-30T11:02:42.577Z","repository":{"id":358498417,"uuid":"1241632001","full_name":"italoc/silla-prism-integration","owner":"italoc","description":"Beta Home Assistant custom integration for Silla Prism EVSE with MQTT solar and home-battery balancing.","archived":false,"fork":false,"pushed_at":"2026-05-26T19:52:09.000Z","size":1714,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-26T21:21:02.123Z","etag":null,"topics":["battery","custom-integration","ev-charging","evse","hacs","home-assistant","mqtt","silla-prism","solar"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/italoc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-17T16:19:35.000Z","updated_at":"2026-05-26T19:52:13.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/italoc/silla-prism-integration","commit_stats":null,"previous_names":["italoc/silla-prism-integration"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/italoc/silla-prism-integration","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/italoc%2Fsilla-prism-integration","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/italoc%2Fsilla-prism-integration/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/italoc%2Fsilla-prism-integration/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/italoc%2Fsilla-prism-integration/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/italoc","download_url":"https://codeload.github.com/italoc/silla-prism-integration/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/italoc%2Fsilla-prism-integration/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33689564,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-30T02:00:06.278Z","response_time":92,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["battery","custom-integration","ev-charging","evse","hacs","home-assistant","mqtt","silla-prism","solar"],"created_at":"2026-05-30T11:02:40.908Z","updated_at":"2026-05-30T11:02:42.569Z","avatar_url":"https://github.com/italoc.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Silla Prism Solar custom integration\n\n![Silla Prism Solar](image.png)\n\nThis repository contains a custom integration to integrate a Silla Prism EVSE\ninside Home Assistant.\n\n## Fork status\n\nThis project is a fork of\n[persuader72/silla-prism-integration](https://github.com/persuader72/silla-prism-integration).\nThe original project provides the base Silla Prism MQTT integration; this fork\nadds experimental solar and home-battery charging logic.\n\n\u003e **Beta notice:** this fork is still in beta. The solar balancing features can\n\u003e actively change the current limit and operating mode of the EVSE through MQTT.\n\u003e Test carefully with conservative limits before relying on it unattended.\n\n## New features in this fork\n\n- Solar battery balancing switch per Prism charging port.\n- Dynamic EV current control from Prism MQTT data, grid import/export, EV output\n  power, port voltage and a Home Assistant home-battery power sensor.\n- Optional home-battery SOC sensor selected directly from Home Assistant.\n- Entity selectors for both the home-battery power sensor and SOC sensor, so the\n  configuration no longer requires manually typing entity IDs.\n- Configurable single-phase or three-phase surplus calculation.\n- Configurable target grid export, import/export deadband and stable-surplus\n  start delay to avoid chasing noisy measurements.\n- Slow current ramp-up and fast ramp-down to reduce unwanted grid imports.\n- Residual export recovery, which increases current by 1A after stable unused\n  export remains available.\n- Proportional current correction, so large sustained export can increase\n  current faster while real import can reduce it faster.\n- Automatic home-battery priority based on SOC:\n  - low SOC reserves the configured battery charge power for the home battery;\n  - medium SOC reserves a smaller configurable amount;\n  - high SOC reserves an even smaller configurable amount;\n  - SOC \u003e= 95% gives priority to the EV.\n- In solar mode, temporary low surplus no longer pauses the port; the\n  controller keeps the EVSE in solar mode at 6A and raises current again when\n  surplus returns. If the current limit was changed manually, that manual limit\n  is preserved while low surplus remains. If Prism enters autolimit because of\n  house-load protection, the controller waits until grid import is back inside\n  the configured deadband, then makes one 6A recovery attempt with a cooldown to\n  avoid command loops. If Prism reports paused mode/state, for example because a\n  charge limit was reached, the controller respects that pause and does not\n  force solar mode again.\n- Diagnostic sensors for calculated surplus, target current, grid power,\n  battery power used in the calculation and controller decision reason.\n\n## Installation\n\nPrerequisites: A working MQTT server.\n\n1) Configure the Prism EVSE to work with your MQTT server as shown in the\n   [Prism MQTT manual](https://support.silla.industries/wp-content/uploads/2023/09/DOC-Prism_MQTT_Manual-rel.2.0_rev.-20220105-EN.pdf).\n2) Configure and enable the [MQTT integration](https://www.home-assistant.io/integrations/mqtt/) for Home Assistant.\n3) Install this custom integration with HACS as a custom repository, or copy the\n   `custom_components/silla_prism` directory into your Home Assistant\n   `custom_components` directory.\n\n## Usage\n\n1. Add the Silla Prism integration from the Home Assistant dashboard.\n   [![Open your Home Assistant instance and start setting up a new integration of a specific brand.](https://my.home-assistant.io/badges/brand.svg)](https://my.home-assistant.io/redirect/brand/?brand=silla_prism)\n\n2. Keep note of base path for all Prism topics\n\n   \u003cimg alt=\"Prism custom MQTT setup\" src=\"images/setup-mqtt-custom.png\" width=\"420\"\u003e\n\n3. **Topic**: set the base path for all Prism topics. It must match the value\n   configured in Prism. Keep the trailing **/** at the end of the topic.\n\n4. **Number of ports**: if you have more than one port, for example Prism Duo,\n   set the matching number of ports. For a single-port Prism, keep the default\n   value of `1`.\n\n5. **Serial number** or **unique code**: if you have more than one Prism\n   connected to Home Assistant, fill this with a unique value, such as the serial\n   number. For a single Prism, this can stay blank.\n\n6. **Enable virtual sensor**: enables additional sensors derived from the\n   original Prism sensors, such as total energy imported from the grid.\n\n7. Configure the integration options. The setup form now includes inline field\n   descriptions and examples for the solar battery balancing options.\n\n   \u003cimg alt=\"Silla Prism configuration connection and battery sensors\" src=\"images/config-solar-battery-1-connection.png\" width=\"520\"\u003e\n\n   The first part contains the MQTT topic, the maximum current limit, the switch\n   that enables solar battery balancing, and the Home Assistant sensors used for\n   home-battery power, real solar production, optional house load and SOC.\n   Select the battery power sensor in W and, when you want the direct\n   solar-minus-house calculation, select both a solar production sensor in W and\n   a house load sensor in W. The house load sensor should exclude the EV charger\n   when possible; if your meter includes the EV charger, create a template sensor\n   that subtracts Prism EV output power. Enable the battery sign option when your\n   battery sensor is positive while discharging and negative while charging.\n\n   \u003cimg alt=\"Silla Prism configuration battery priority and charging phases\" src=\"images/config-solar-battery-2-battery-priority.png\" width=\"520\"\u003e\n\n   The second part sets the low-SOC battery reserve, the number of EV charging\n   phases, the stable surplus delay, and whether battery charging power can be\n   treated as EV surplus. Use `1` for single-phase charging or `3` for\n   three-phase charging. In solar mode, low surplus is held at 6A instead of\n   pausing the port, so the delay only affects when current can rise above the\n   minimum.\n\n   \u003cimg alt=\"Silla Prism configuration SOC reserves and ramp settings\" src=\"images/config-solar-battery-3-reserves-ramp.png\" width=\"520\"\u003e\n\n   The third part defines the SOC thresholds and the power still reserved for\n   the home battery at medium and high SOC. It also sets the target grid export,\n   the import/export deadband, and the minimum interval between current\n   increases. These values decide how aggressively the controller gives direct\n   solar production to the EV while avoiding unwanted grid import.\n\n   \u003cimg alt=\"Silla Prism configuration current steps and residual export recovery\" src=\"images/config-solar-battery-4-export-recovery.png\" width=\"520\"\u003e\n\n   The last part controls the current ramp steps and residual export recovery.\n   The increase step limits how quickly current rises, the decrease step lets\n   the controller react faster when house loads appear, and residual export\n   recovery adds current again if export remains unused for the configured time.\n\n## Solar battery balancing\n\nThe integration can optionally create a `Solar battery balancing` switch for each\ncharging port. When enabled, it reads the Prism grid power, the Prism output\npower, the port voltage and a Home Assistant battery power sensor, then updates\nthe Prism current limit so the EV uses only the available solar surplus without\ndischarging the battery.\n\nConfigure it from the integration setup/reconfigure form:\n\n| Option | Description |\n| ------ | ----------- |\n| Enable solar battery balancing | Creates the balancing switch. |\n| Battery power sensor | Home Assistant entity that reports battery charge/discharge power in W. |\n| Solar production power sensor | Home Assistant entity that reports real PV production in W. Use this instead of Prism `energy_data/power_solar` when that topic is not populated. Required when the home load sensor is configured. |\n| Home load power sensor | Optional Home Assistant entity that reports house load in W, preferably excluding the EV charger. When set together with the solar production sensor, the controller uses external solar production minus external house load to calculate EV surplus. |\n| Home battery SOC sensor | Optional Home Assistant entity that reports the home battery state of charge in %. |\n| Battery discharge is a positive value | Enable this if the sensor is positive while the battery is discharging and negative while charging. Disable it if your sensor uses the opposite sign. |\n| Maximum battery charge power | Battery charge power, in W, reserved for the home battery while SOC is low. Default is `2700`. |\n| Number of charging phases | Use `1` for single phase or `3` for three phase charging. |\n| Stable surplus delay | Minutes of continuous surplus required before the integration starts charging. The default is `5`. |\n| Use battery charge as surplus | When enabled, battery charging power is also treated as available EV surplus. This gives the car priority over storing that solar energy first. |\n| Medium home battery SOC | SOC threshold where the reserved battery charge power drops to the medium reserve. Default is `40`. |\n| High home battery SOC | SOC threshold where the reserved battery charge power drops to the high reserve. Default is `80`. |\n| Medium SOC battery reserve | Approximate maximum battery charge power, in W, kept for the home battery at medium SOC before sending the rest to the EV. Default is `1500`. |\n| High SOC battery reserve | Approximate maximum battery charge power, in W, kept for the home battery at high SOC before sending the rest to the EV. Default is `1000`. |\n| Target grid export | Watts to intentionally keep exported as a safety buffer. Default is `150`. |\n| Import/export deadband | Watts around the target export where current is left unchanged. Default is `150`. |\n| Minimum current increase interval | Minimum seconds between upward current steps. Default is `15`. |\n| Maximum current increase step | Maximum amp increase per ramp step. Default is `1`. |\n| Maximum current decrease step | Maximum amp decrease per correction. Default is `3`. |\n| Residual export for current recovery | Extra export that must remain available before adding current beyond the rounded calculation. Default is `400`. |\n| Residual export time before recovery | Seconds residual export must stay above threshold before recovery. Default is `60`. |\n\nWithout both external solar production and external home load sensors, the\ncontroller estimates EV surplus from live Prism EV power, grid import/export and\nbattery power:\n\n```text\navailable_power = ev_power - grid_power - battery_power_to_exclude\ntarget_power = available_power - target_grid_export\n```\n\nWith both external sensors configured, it uses the more direct house-load\nformula. Prism `energy_data/power_solar` and `energy_data/power_house` are not\nused for this direct calculation because on some installations they stay at\n`0`:\n\n```text\navailable_power = solar_production - home_load_power\nif use_battery_charge:\n    available_power += battery_charge_available_above_reserve only when solar_production \u003e home_load_power\ntarget_power = available_power - target_grid_export\n```\n\n```mermaid\nflowchart TD\n    A[\"Read live data\u003cbr/\u003egrid, EV power, voltage,\u003cbr/\u003eexternal solar production,\u003cbr/\u003eexternal home load, battery power and SOC\"] --\u003e B[\"Protect the home battery\u003cbr/\u003ereserve more power at low SOC,\u003cbr/\u003ereserve less at high SOC\"]\n    B --\u003e C{\"Home load sensor\u003cbr/\u003eand solar data available?\"}\n    C --\u003e|Yes| C1[\"Calculate direct EV surplus\u003cbr/\u003eavailable_power = external solar - external home load\u003cbr/\u003eplus optional battery charge above reserve\"]\n    C --\u003e|No| C2[\"Estimate EV surplus\u003cbr/\u003eavailable_power = EV power - grid power\u003cbr/\u003eminus battery power to exclude\"]\n    C1 --\u003e D[\"Keep a small grid export target\u003cbr/\u003etarget_power = available_power - target_grid_export\"]\n    C2 --\u003e D[\"Keep a small grid export target\u003cbr/\u003etarget_power = available_power - target_grid_export\"]\n    D --\u003e E{\"Enough surplus\u003cbr/\u003efor at least 6A?\"}\n\n    E --\u003e|No, autolimit active| F{\"Grid import\u003cbr/\u003einside deadband?\"}\n    E --\u003e|No, no autolimit| G[\"Keep Prism in solar mode\u003cbr/\u003ehold 6A unless current was changed manually\"]\n    E --\u003e|Yes| H[\"Convert surplus to target current\u003cbr/\u003eand clamp between 6A and max current\"]\n\n    F --\u003e|No| L[\"Respect Prism autolimit\u003cbr/\u003ewait for load to drop\"]\n    F --\u003e|Yes, cooldown elapsed| G\n    G --\u003e K[\"Publish MQTT commands\u003cbr/\u003eset_current_limit and solar mode\"]\n    H --\u003e I[\"Stabilize current\u003cbr/\u003edeadband avoids oscillation\u003cbr/\u003eslow ramp-up and faster ramp-down\"]\n    I --\u003e J[\"Recover unused export\u003cbr/\u003eadd current if export stays available\"]\n    J --\u003e K[\"Publish MQTT commands\u003cbr/\u003eset_current_limit and solar mode\"]\n```\n\nWith the default sign convention, battery discharge reduces the available EV\npower in the fallback estimator, while battery charge is not counted as available\npower. With both external solar production and home load sensors, battery\ndischarge is not treated as EV surplus: the EV receives only direct solar left\nafter the configured house load, plus optional battery charge power above the\nprotected reserve only when solar production already exceeds the house load. If\nthe available\npower is below the minimum Type 2 current of 6A while solar balancing is\nenabled, the port is kept in solar mode at 6A instead of being paused. If the\ncurrent limit was changed manually, the controller preserves that manual limit\nwhile low surplus remains. If Prism reports autolimit mode, the controller\ntreats that as a wallbox protection state. It does not force solar mode while\nthere is real grid import above the configured deadband. Once the load has\ndropped and grid import is back inside the deadband, it tries one recovery at\n6A, then waits 5 minutes before any further autolimit recovery attempt.\nIf Prism reports paused mode or pause state, the controller treats it as a\ndeliberate wallbox pause, for example a charge limit reached in the wallbox/app,\nand does not resume charging automatically. Change the port mode back to\nsolar/normal or toggle the balancing switch when you want the controller to take\nover again.\nIf `Use battery charge as surplus` is enabled, battery charging power is counted\ntoo, but only for the part that exceeds the battery charge power currently\nreserved for the home battery. The controller also uses live battery charge\npower as feedback: if the battery is still charging above the configured reserve\nand grid import is not excessive, it can raise EV current gradually to bring\nbattery charging back toward that maximum. Because the EV current changes in 1A\nsteps, the battery target is approximate. Without a SOC sensor, the fixed\nreserve is the configured maximum battery charge power. With a SOC sensor, the\nreserve is dynamic: low SOC reserves the configured maximum charge power, medium\nSOC reserves the medium value, high SOC reserves the high value, and SOC \u003e= 95%\nreserves `0 W` so the EV gets priority. This lets the car use direct solar\nenergy while still protecting the home battery when it is low. The EV current\nfollows the calculated surplus, clamped between the Type 2 minimum of 6A and the\nconfigured maximum current.\nThe controller then applies a target export, a deadband, ramp limits and\nresidual export recovery. By default it tries to keep about `150 W` exported,\nignores changes within `150 W`, increases by at most `1A` every `15` seconds,\ndecreases by up to `3A` immediately, and adds `1A` if more than `400 W` remains\nexported for `60` seconds.\nBefore raising current above the minimum from a low-surplus hold, the surplus\ncan be delayed by the configured ramp and stabilization settings. This helps\navoid short clouds or transient loads repeatedly changing the car current. If\nsurplus drops below the Type 2 minimum, the port is kept in solar mode at 6A\ninstead of being paused, unless Prism reports autolimit and grid import is still\nabove the deadband.\n\nWhen enabled, the integration also exposes additional sensors for each port:\n\n| Entity | Description |\n| ------ | ----------- |\n| Solar balance status | Shows whether balancing is disabled, waiting for data, paused by the wallbox, waiting for stable surplus, holding at 6A for low surplus or charging from surplus. |\n| Solar surplus current | Current in amps currently available from the calculated solar surplus. |\n| Stable surplus countdown | Seconds remaining before the integration starts charging automatically. |\n| Calculated total surplus | Total power available to the balancing algorithm. |\n| Battery power used in calculation | Battery contribution used by the algorithm. Positive values reduce EV power, negative values increase available EV power. |\n| Grid power used in calculation | Latest Prism grid power value used by the algorithm. |\n| Solar production used in calculation | Latest configured solar production sensor value used by the algorithm. |\n| Home load used in calculation | Latest configured home load sensor value used by the algorithm. |\n| Calculated target current | Final current the algorithm wants to send to Prism after deadband, ramp and recovery limits. |\n| Raw target current | Current calculated directly from surplus before stabilisation. |\n| Battery reserve power | Home-battery charge power currently protected by the SOC logic. |\n| Target export power | Configured export buffer used by the controller. |\n| Unused export power | Export still available beyond the target export and deadband; this is the power the EV could still recover. |\n| Residual export countdown | Seconds remaining before unused export can trigger a current recovery step. |\n| Decision reason | The current reason for the controller decision. |\n\nThe solar balance diagnostic entities also expose extra attributes including\n`battery_soc`, `battery_reserve_power`, `battery_charge_power`,\n`battery_discharge_power`, `solar_power`, `home_load_power`, `surplus_source`,\n`available_power`, `target_power`,\n`raw_target_current`, `target_current`, `unused_export_power`,\n`excess_import_power`, `deadband_active`, `ramp_limited`, `ramp_direction` and\n`current_limit_reason`.\n\n## Entities\n\n| Entity ID                         | Type         | Description                                                  | Unit                                   |\n| --------------------------------- | ------------ | ------------------------------------------------------------ | -------------------------------------- |\n| silla_prism_online                | BinarySensor | Sensor to find if Prism is connected or not                  |                                        |\n| silla_prism_current_state         | Sensor       | Current state of Prism                                       | \"idle\", \"waiting\", \"charging\", \"pause\" |\n| silla_prism_power_grid_voltage    | Sensor       | Measured voltage from grid                                   | V                                      |\n| silla_prism_output_power          | Sensor       | Power provided to the charging port                          | W                                      |\n| silla_prism_output_current        | Sensor       | Current provided to the charging port                        | mA                                     |\n| silla_prism_output_car_current    | Sensor       | Current driven by the car                                    | A                                      |\n| silla_prism_current_set_by_user   | Sensor       | Current limit set by user                                    | A                                      |\n| silla_prism_session_time          | Sensor       | Duration of the current session                              | s                                      |\n| silla_prism_session_output_energy | Sensor       | Energy provided to the charging port during the current session | Wh                                     |\n| silla_prism_total_output_energy   | Sensor       | Total energy                                                 | Wh                                     |\n| silla_prism_error                 | BinarySensor | Error status (ON when there is an error)                     |                                        |\n| silla_prism_current_port_mode     | Sensor       | Current port mode                                            | solar,normal,paused                    |\n| silla_prism_input_grid_power      | Sensor       | Input power from grid                                        | W                                      |\n| silla_prism_set_max_current       | Number       | Set the user current limit                                   | A                                      |\n| silla_prism_set_current_limit     | Number       | Set the  current limit                                       | A                                      |\n| silla_prism_set_mode              | Select       | Set current port mode                                        | solar,normal,paused                    |\n| silla_prism_touch_sigle           | BinarySensor | Goes on for 1 second after a single touch gesture            | On,Off                                 |\n| silla_prism_touch_double          | BinarySensor | Goes on for 1 second after a double touch gesture            | On,Off                                 |\n| silla_prism_touch_long            | BinarySensor | Goes on for 1 second after a long touch gesture              | On,Off                                 |\n\n## Computed Entities\n\nComputed entities are not directly measured from Prism but are derived from other measurements. \n\n| Entity ID                     | Type   | Description                  | Unit |\n| ----------------------------- | ------ | ---------------------------- | ---- |\n| silla_prism_input_grid_energy | Sensor | Total energy taken from grid | Wh   |\n|                               |        |                              |      |\n|                               |        |                              |      |\n\n\n# Setting up the user interface\n\n## With the charger card integration\n\n\u003cimg alt=\"EV Charger Card preview\" src=\"images/charger-card-preview.png\" width=\"360\"\u003e\n\nIt's possible to configure the [EV Charger Card](https://github.com/tmjo/charger-card) using the configuration example [provided](https://github.com/persuader72/custom-components/blob/main/charger-card/template.yaml) in this repository \n\n## With automations and helpers\n\nThe following four examples show how to set up a simple interface\nvia Home Assistant helpers (input booleans) and automations.  You do\nnot have to use all four!\n\nThese automations and input booleans can also be used with the\nEV Charger Card, though they are most useful without it.\n\n### Start/stop charge with a switch\n\nFor now, disable Autostart on the Prism (later I will show how to keep\nit enabled).\n\nCreate an \"Input Boolean\" called `prism_charge` (suggested icon:\n`mdi:ev-plug-type2`).  The following automation starts and stop the\ncharging process when `prism_charge` is toggled:\n\n```yaml\nalias: Prism - authorize/deauthorize\ntriggers:\n  - trigger: state\n    entity_id:\n      - input_boolean.prism_charge\n    id: changed_switch\n  - trigger: state\n    entity_id:\n      - sensor.silla_prism_current_state\n    id: changed_state\nactions:\n  - if:\n      - condition: state\n        entity_id: sensor.silla_prism_current_state\n        state: idle\n    then:\n      - action: input_boolean.turn_off\n        target:\n          entity_id: input_boolean.prism_charge\n      - stop: No charging cable connected\n  - condition: trigger\n    id:\n      - changed_switch\n  - if:\n      - condition: state\n        entity_id: input_boolean.prism_charge\n        state: 'on'\n    then:\n      - action: button.press\n        target:\n          entity_id: button.silla_prism_set_mode_traps_auth\n    else:\n      - action: button.press\n        target:\n          entity_id: button.silla_prism_set_mode_traps_noauth\nmode: single\n```\n\n### Start/stop charge with a single touch on the Prism\n\nWith the previous set up, Autostart is disabled, but starting/stopping\nthe charge process with the Prism key fobs does not synchronize with\nthe Input Boolean.\n\nInstead of using the key fobs, you can configure another automation that\ntoggles the Input Boolean with a single touch on the Prism's sensor:\n\n```yaml\nalias: Prism - toggle charge after single touch event\ndescription: \"\"\ntriggers:\n  - trigger: state\n    entity_id:\n      - binary_sensor.silla_prism_touch_sigle\n    to: on\nactions:\n  - action: input_boolean.toggle\n    target:\n      entity_id: input_boolean.prism_charge\nmode: single\n```\n\n### Same setup but with Autostart enabled\n\nIf you prefer to keep Autostart enabled or to use the key fobs, just ensure\n`prism_charge` changes to on and off when `sensor.silla_prism_current_state`\nbecomes respectively `charging` or anything else:\n\n```yaml\nalias: Prism - synchronize charging state\ndescription: \"\"\ntriggers:\n  - trigger: state\n    entity_id:\n      - sensor.silla_prism_current_state\n    id: changed_prism\nactions:\n  - if:\n      - condition: state\n        entity_id: sensor.silla_prism_current_state\n        state: charging\n    then:\n      - action: input_boolean.turn_on\n        target:\n          entity_id: input_boolean.prism_charge\n  - else:\n      - action: input_boolean.turn_off\n        target:\n          entity_id: input_boolean.prism_charge\nmode: single\n```\n\nThis can be used with any combination of the previous automations.\n\n### Switch normal/solar modes from Home Assistant\n\nCreate an \"Input Boolean\" called `prism_solar_mode` (suggested icon:\n`mdi:weather-sunny`).  The following automation keeps it synchronized\nwith the \"solar\" and \"normal\" modes of the Prism dashboard:\n\n```yaml\nalias: Prism - synchronize solar/normal mode\ndescription: \"\"\ntriggers:\n  - trigger: state\n    entity_id:\n      - input_boolean.prism_solar_mode\n    id: changed_helper\n  - trigger: state\n    entity_id:\n      - sensor.silla_prism_current_port_mode\n    id: changed_prism\nactions:\n  - if:\n      - condition: trigger\n        id:\n          - changed_helper\n    then:\n      - if:\n          - condition: state\n            entity_id: input_boolean.prism_solar_mode\n            state: on\n        then:\n          - action: select.select_option\n            data:\n              option: solar\n            target:\n              entity_id: select.silla_prism_set_mode\n        else:\n          - action: select.select_option\n            data:\n              option: normal\n            target:\n              entity_id: select.silla_prism_set_mode\n    else:\n      - if:\n          - condition: state\n            entity_id: sensor.silla_prism_current_port_mode\n            state: solar\n        then:\n          - action: input_boolean.turn_on\n            target:\n              entity_id: input_boolean.prism_solar_mode\n      - if:\n          - condition: state\n            entity_id: sensor.silla_prism_current_port_mode\n            state: normal\n        then:\n          - action: input_boolean.turn_off\n            target:\n              entity_id: input_boolean.prism_solar_mode\nmode: single\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitaloc%2Fsilla-prism-integration","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitaloc%2Fsilla-prism-integration","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitaloc%2Fsilla-prism-integration/lists"}