Skip to content

[EN] Including degree symbol in HassClimateSetTemperature temperature causes an error #3643

Description

@jackwilsdon

Including the degree symbol (°) in the HassClimateSetTemperature command in English causes a ValueError:

stage: done
run:
  pipeline: 01hjsafjatqb7n37tpj8r6n7m8
  language: en
  conversation_id: 01KCPQNXPHN1RCQSX5G2GVXXV9
  runner_data:
    stt_binary_handler_id: null
    timeout: 300
events:
  - type: run-start
    data:
      pipeline: 01hjsafjatqb7n37tpj8r6n7m8
      language: en
      conversation_id: 01KCPQNXPHN1RCQSX5G2GVXXV9
      runner_data:
        stt_binary_handler_id: null
        timeout: 300
    timestamp: "2025-12-17T18:03:33.058799+00:00"
  - type: intent-start
    data:
      engine: conversation.home_assistant
      language: en
      intent_input: Set the living room heating to 22°
      conversation_id: 01KCPQNXPHN1RCQSX5G2GVXXV9
      device_id: null
      satellite_id: null
      prefer_local_intents: false
    timestamp: "2025-12-17T18:03:33.058930+00:00"
  - type: intent-end
    data:
      processed_locally: true
      intent_output:
        response:
          speech:
            plain:
              speech: >-
                ValueError: Template error: float got invalid input '22°' when
                rendering template 'Temperature set to {{ slots.temperature }}
                {{ 'degree' if (slots.temperature | float) == 1 else 'degrees'
                }}' but no default was specified
              extra_data: null
          card: {}
          language: en
          response_type: error
          data:
            code: unknown
        conversation_id: 01KCPQNXPHN1RCQSX5G2GVXXV9
        continue_conversation: false
    timestamp: "2025-12-17T18:03:33.281913+00:00"
  - type: run-end
    data: null
    timestamp: "2025-12-17T18:03:33.282112+00:00"
started: 2025-12-17T18:03:33.058Z
intent:
  engine: conversation.home_assistant
  language: en
  intent_input: Set the living room heating to 22°
  conversation_id: 01KCPQNXPHN1RCQSX5G2GVXXV9
  device_id: null
  satellite_id: null
  prefer_local_intents: false
  done: true
  processed_locally: true
  intent_output:
    response:
      speech:
        plain:
          speech: >-
            ValueError: Template error: float got invalid input '22°' when
            rendering template 'Temperature set to {{ slots.temperature }} {{
            'degree' if (slots.temperature | float) == 1 else 'degrees' }}' but
            no default was specified
          extra_data: null
      card: {}
      language: en
      response_type: error
      data:
        code: unknown
    conversation_id: 01KCPQNXPHN1RCQSX5G2GVXXV9
    continue_conversation: false
finished: 2025-12-17T18:03:33.282Z

It seems like the symbol is being incorrectly included in the temperature slot.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions