Voice PE to control Ecobee

Has anybody got this working well with HA? I am trying to get it to work by using phrases such as “I am hot”, etc without too much luck. Even using the HA sentences parser I am not getting it to recognize the phrasing. I beat my head on it for a while with ChatGPT so I thought I would ask if anybody else has got it working. My main goal it to get it working so I can set it up at my mother in laws as well. She is losing her vision and anything I can do to help her make her life a little bit easier I am there.

I have updated my config/intents/en.yaml file to include

AdjustTemperature:

slots:

temperature_direction:

  • freezing

  • cold

  • cool

  • warm

  • hot

  • boiling

sentences:

  • I am {temperature_direction}

  • I’m {temperature_direction}

  • I feel {temperature_direction}

  • It’s too {temperature_direction}

  • It’s feeling {temperature_direction}

  • I’m feeling {temperature_direction}

I have also added this to my intent_script. yaml file

AdjustTemperature:

speech:

text: >

{% if temperature_direction in [‘hot’, ‘boiling’, ‘warm’] %}

Okay, lowering the temperature by one degree.

{% elif temperature_direction in [‘cold’, ‘freezing’, ‘cool’] %}

Got it. Raising the temperature by one degree.

{% else %}

I’m not sure how to adjust the thermostat.

{% endif %}

action:

  • variables:

climate_entity: climate.thermostat

current_temp: “{{ state_attr(climate_entity, ‘temperature’) | float }}”

  • choose:

  • conditions: “{{ temperature_direction in [‘hot’, ‘boiling’, ‘warm’] }}”

sequence:

  • service: climate.set_temperature

target:

entity_id: “{{ climate_entity }}”

data:

temperature: “{{ current_temp - 1 }}”

  • conditions: “{{ temperature_direction in [‘cold’, ‘freezing’, ‘cool’] }}”

sequence:

  • service: climate.set_temperature

target:

entity_id: “{{ climate_entity }}”

data:

temperature: “{{ current_temp + 1 }}”

Please could you post your code a preformatted text (</> in the toolbar). It’s quite difficult to follow otherwise and people need to be able to copy it to test it.

1 Like

Here is my Intent_script

WatchHulu:
  action:
    - service: script.watch_hulu
    
WatchPlex:
  action:
    - service: script.watch_plex
    
WatchYouTube:
  action:
    - service: script.watch_youtube
    
AdjustTemperature:
  speech:
    text: >
      {% if temperature_direction in ['freezing', 'cold'] %}
        Got it. Raising the temperature by 2 degrees.
      {% elif temperature_direction == 'cool' %}
        Got it. Raising the temperature by 1 degree.
      {% elif temperature_direction == 'warm' %}
        Okay, lowering the temperature by 1 degree.
      {% elif temperature_direction in ['hot', 'boiling'] %}
        Okay, lowering the temperature by 2 degrees.
      {% else %}
        I'm not sure how to adjust the thermostat.
      {% endif %}
  action:
    - variables:
        climate_entity: climate.thermostat  # replace with your entity ID
        current_temp: "{{ state_attr(climate_entity, 'temperature') | float }}"
    - choose:
        - conditions: "{{ temperature_direction in ['freezing', 'cold'] }}"
          sequence:
            - service: climate.set_temperature
              target:
                entity_id: "{{ climate_entity }}"
              data:
                temperature: "{{ current_temp + 2 }}"
        - conditions: "{{ temperature_direction == 'cool' }}"
          sequence:
            - service: climate.set_temperature
              target:
                entity_id: "{{ climate_entity }}"
              data:
                temperature: "{{ current_temp + 1 }}"
        - conditions: "{{ temperature_direction == 'warm' }}"
          sequence:
            - service: climate.set_temperature
              target:
                entity_id: "{{ climate_entity }}"
              data:
                temperature: "{{ current_temp - 1 }}"
        - conditions: "{{ temperature_direction in ['hot', 'boiling'] }}"
          sequence:
            - service: climate.set_temperature
              target:
                entity_id: "{{ climate_entity }}"
              data:
                temperature: "{{ current_temp - 2 }}"

And here is my en.yaml

language: "en"

intents:
  WatchNetflix:
    sentences:
      - "Watch Netflix"

  WatchPlex:
    sentences:
      - "Watch Plex"

  WatchHulu:
    sentences:
      - "Watch Hulu"

  WatchYouTube:
    sentences:
      - "Watch YouTube"

  AdjustTemperature:
    slots:
      temperature_direction:
        - freezing
        - cold
        - cool
        - warm
        - hot
        - boiling
    sentences:
      - I am {temperature_direction}
      - I'm {temperature_direction}
      - I feel {temperature_direction}
      - It's too {temperature_direction}
      - It's feeling {temperature_direction}
      - I'm feeling {temperature_direction}

Hope this helps… Thank you

Are you using LLM or are you trying to use short phrase.

Theres a few different ways. My preference is to build tools and reach the llm about the tools

Your list above appears you’re trying to use short phrases and the methodology for local services but you also mention llm.

What are you actually planning on using?

I am open to whatever works best. I have a local LLM set up at home but for my mother in laws she is set up using HA cloud. I was trying to set it up at my home first for testing then setting it up at my mother in laws house. Since she has a hard time seeing being able to voice that she is either cold or hot and having the ecobee adjust itself is my main goal.