mirror of
https://github.com/house-of-abbey/GarminHomeAssistant.git
synced 2025-12-23 14:18:15 +00:00
Add EV charger mode select example to Actions docs
Expanded the Selects section with an example showing how to use a tap action to cycle through EV charger modes using the select service. Also credited the community member who contributed the example.
This commit is contained in:
@@ -119,7 +119,26 @@ If you would like to temporarily disable an item in your menu, e.g. for seasonal
|
|||||||
|
|
||||||
# Selects
|
# Selects
|
||||||
|
|
||||||
Here is an example of how to make a light effect selector:
|
An example of using a `select` service. In this example, the `tap` item allows you to pick the mode of your EV charger. The code snippet asks Home Assistant to cycle to the next mode every time the menu item is pressed.
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"name": "SmartEVSE Mode",
|
||||||
|
"content": "{{ states('select.smartevse_mqtt_mode') }}",
|
||||||
|
"type": "tap",
|
||||||
|
"tap_action": {
|
||||||
|
"service": "select.select_next",
|
||||||
|
"data": {
|
||||||
|
"entity_id": "select.smartevse_mqtt_mode",
|
||||||
|
"cycle": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Try the same pattern for any selector `input_select.*`, `select.*`, `climate.*` mode? With thanks to @[arobaZ](https://community.home-assistant.io/u/arobaZ) for the above example.
|
||||||
|
|
||||||
|
Here's another example of how to make a light effect selector using a `group` menu item with explicitly defined menu items below it:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
@@ -176,8 +195,6 @@ Here is an example of how to make a light effect selector:
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
The same pattern works for any selector (`input_select.*`, `select.*`, `climate.*` mode).
|
|
||||||
|
|
||||||
## Credits
|
## Credits
|
||||||
|
|
||||||
With thanks to Matthias Oesterheld, [moesterheld](https://github.com/moesterheld) for contributing the PIN feature.
|
With thanks to Matthias Oesterheld, [moesterheld](https://github.com/moesterheld) for contributing the PIN feature.
|
||||||
|
|||||||
Reference in New Issue
Block a user