home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.55k stars 30.73k forks source link

Tesla Route never matches home due to capital letter #126010

Open c2ho5ohx2 opened 1 month ago

c2ho5ohx2 commented 1 month ago

The problem

When doing Automation and condition to match for Tesla Route: condition:

What version of Home Assistant Core has the issue?

core-2024.9.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Tesla Fleet

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

alias: Tesla coming home
description: ""
trigger:
  - platform: zone
    entity_id: device_tracker.tesla_y_location
    zone: zone.home
    event: enter
  - type: distance
    platform: device
    device_id: ac2308f19695082b51577ebdb4206785
    entity_id: 79c71be6fd5e8cc589e85f9747d94080
    domain: sensor
    below: 0.2
condition:
  - condition: device
    device_id: ac2308f19695082b51577ebdb4206785
    domain: device_tracker
    entity_id: 8a5ec73b1a6dc440d85e3cb92cabbef1
    type: is_home
  - type: is_present
    condition: device
    device_id: ac2308f19695082b51577ebdb4206785
    entity_id: f17fa64b9c891db805f1fd0bea3a0873
    domain: binary_sensor
  - type: is_powered
    condition: device
    device_id: a4a186ff5bca2a117f4e94a083a598a2
    entity_id: 129dab0661b3e236f8d0ca298a41ef8d
    domain: binary_sensor
  - type: is_speed
    condition: device
    device_id: ac2308f19695082b51577ebdb4206785
    entity_id: 77c7892106cabc53041404d2b9629a81
    domain: sensor
    below: 30
    above: 10
    enabled: false
action:
  - type: turn_on
    device_id: a4a186ff5bca2a117f4e94a083a598a2
    entity_id: 280baf5c14c07c3ee9193311d32d629a
    domain: switch
mode: single

Anything in the logs that might be useful for us?

Lost the trgiger evaluation, but it clearly showed returned value Home, when condition expected home (notice capital and non-capital h)

Additional information

No response

home-assistant[bot] commented 1 month ago

tesla documentation tesla source

c2ho5ohx2 commented 1 month ago

Sometimes tesla route is detected as "home", sometimes as "Home", see screenshot Tesla ROute Problem

c2ho5ohx2 commented 1 month ago

Did a workaround to match with OR, between "home" and "Home". Here one execution of the automation: alias: Tesla coming home description: "" trigger:

Execution on step for the route: Executed: September 19, 2024 at 8:32:34 PM Result:

result: true

conditions/0 Executed: September 19, 2024 at 8:32:34 PM Result:

result: false state: Home wanted_state: home

conditions/1 Executed: September 19, 2024 at 8:32:34 PM Result:

result: true

conditions/1/entity_id/0 Executed: September 19, 2024 at 8:32:34 PM Result:

result: true state: Home wanted_state: Home

Trigered by: type: distance platform: device device_id: ac2308f19695082b51577ebdb4206785 entity_id: 79c71be6fd5e8cc589e85f9747d94080 domain: sensor below: 0.1

unfortunatelly, since I recreated the autoamtion, I do not have a trace to show when the state is reported with lower letter, even though in previous autiomation, I've seen it.