Help on automation creation


I am facing an issue to create an automation for my electric car.
I can do the action manually from the board, but I am not able to find how to do it in automation.
in this case I need to select an option in a selector :

To summarize, it is working well from the selector, not from automation or developper Tools service menu.

Editing this menu I have found the device attached, it is the car id + “Mode de charge” (Charging mode)

Going to developper menu I have found that options :

  - always
  - always_charging
  - schedule_mode

the state is given as unknown.
Trying a “set state” to always has no effect.

Anyone can help on how to change state ?

I’m not sure I really understand what you’re trying to do, sorry.

I have a guess, you’re trying to change the value of that select menu in an automation, is that right?

If so, you have to use the services for an input_select:

Something like this example:

# Example configuration.yaml entry
  - alias: "example automation"
      platform: event
      event_type: MY_CUSTOM_EVENT
      - service: input_select.select_option
          entity_id: input_select.who_cooks
          option: Paulus

(taken from the page I linked above)

Hi Patrick,
This is not what I am looking for.
The selector exist, it has been done by the “Renault” integration in HA.
What I want to do is the same thing than selecting the action in the selector using HA interface manually but using an automation.
Can you help ?

That is exactly what I posted above. :slight_smile: Or maybe I misunderstand what you’re trying to do, so let’s get that sorted.

You have a select menu in the frontend, that has three states (‘Instant’, ‘Instant’ and ‘Planner’). If you are on your dashboard (the page where you operate HA), you can open that select menu and choose one of the three entries. After selecting, the menu closes and the new option is selected. Right so far?

If you want to change that select menu in an automation, as if you’d do it manually, you have to use exactly what I posted above. :slight_smile:

If it is done by an integration it might as well be a select instead of a input-select. Then service: select.select_option should be used instead of service: input_select.select_option.

@usky73 If you click the icon left of the select menu and then the gear icon upper right in the next window you should be able to see the name of the entity. You can see there whether it is a select or input_select.

1 Like

Good point, I haven’t thought about the difference of input_select and select. And as it turns out, you’re right, the Renault integration sets up a select menu.

@usky73 It’s nearly the same, it is just called differently, instead of input_select just use select. See here:

Thank you both, it is exactly what I was looking for.
Your comments was very helpfull.

1 Like