Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Service Call for switching the solar charging mode? #136

Closed
ddeconin-gh opened this issue Jul 15, 2024 · 2 comments
Closed

Service Call for switching the solar charging mode? #136

ddeconin-gh opened this issue Jul 15, 2024 · 2 comments

Comments

@ddeconin-gh
Copy link

I tried writing an automation to switch between modes depending on weather I'm on high rate tarif (green) or low rate tarif (confort).
However, I found that trying to use

device_id: 43141dba6d90ac3eb19bec1b2e59e382
domain: select
entity_id: 5e6516d1deb16a1c5a09715d0e126a7c
type: select_option
option: Comfort

isn't reliable so I'dd like to call a service instead.. Couldn't find the service to use...

D.

@JanDetrez
Copy link

JanDetrez commented Sep 29, 2024

Same issue here, made a small work-arround for now

in configuration.yaml

input_boolean:
  alfen_green_mode:
    name: alfen_green_mode
    icon: mdi:leaf

an automation

alias: Alfen - Select Solar Mode
description: ""
trigger:
  - platform: time_pattern
    seconds: /5
condition: []
action:
  - if:
      - condition: template
        value_template: >-
          {{ (states('input_boolean.alfen_green_mode') == "on") and
          (states('select.alfen_solar_charging_mode')=="Comfort") }}
    then:
      - action: select.select_option
        metadata: {}
        data:
          option: Green
        target:
          entity_id: select.alfen_solar_charging_mode
  - if:
      - condition: template
        value_template: >-
          {{ (states('input_boolean.alfen_green_mode') == "off") and
          (states('select.alfen_solar_charging_mode')=="Green") }}
    then:
      - action: select.select_option
        metadata: {}
        data:
          option: Comfort
        target:
          entity_id: select.alfen_solar_charging_mode
mode: single

@fwestenberg
Copy link
Collaborator

This can also be solved with a template (helper) switch, as described here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants