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

Enable support for HassClimateSetTemperature intent #2821

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mib1185
Copy link
Contributor

@mib1185 mib1185 commented Jan 2, 2025

At the moment the action climate.set_temperature does not support the temperature_unit argument -> an architectural discussion has been started, but it most properly results in a more broader and generic solution, than just add the argument to this single action call.

So even the intent supports the temperature_unit argument, the underlying action call doesn't.
Can we keep temperature_unit argument in the existing sentences or should we remove it for now?

@mib1185 mib1185 marked this pull request as draft January 2, 2025 15:51
@mib1185 mib1185 force-pushed the enable-HassClimateSetTemperature branch from a2f7d56 to 0c02568 Compare January 2, 2025 16:12
@tetele
Copy link
Contributor

tetele commented Jan 3, 2025

I think this is discussion material, but here's my 2c until you open one: we should not remove the optional temperature unit, but we should add context to the intent. Something like:

# sentences/en/_common.yaml
expansion_rules:
  degrees_c: ([ ]°[[ ](c[elsius])])|( degrees c[elsius])
  degrees_c: ([ ]°[[ ](f[ahrenheit])])|( degrees f[ahrenheit])
  temperature_c: "{temperature}[<degrees_c>]"
  temperature_f: "{temperature}[<degrees_f>]"
# sentences/en/climate_HassClimateSetTemperature.yaml
intents:
  HassClimateSetTemperature:
    data:
      - sentences:
          - "(<numeric_value_set>|adjust) <temp> [in <area>] to <temperature_c>"
          - "(<numeric_value_set>|adjust) <area> <temp> to <temperature_c>"
        requires_context:
          temperature_unit: "celsius"
      - sentences:
          - "(<numeric_value_set>|adjust) <temp> [in <area>] to <temperature_f>"
          - "(<numeric_value_set>|adjust) <area> <temp> to <temperature_f>"
        requires_context:
          temperature_unit: "fahrenheit"

Then the conversation agent would include the system temperature unit in the context.

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

Successfully merging this pull request may close these issues.

2 participants