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

Tesla Route never matches home due to capital letter #126010

Closed
c2ho5ohx2 opened this issue Sep 15, 2024 · 6 comments
Closed

Tesla Route never matches home due to capital letter #126010

c2ho5ohx2 opened this issue Sep 15, 2024 · 6 comments
Labels
integration: tesla removed integration stale

Comments

@c2ho5ohx2
Copy link

c2ho5ohx2 commented Sep 15, 2024

The problem

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

  • condition: device
    device_id: ac2308f19695082b51577ebdb4206785
    domain: device_tracker
    entity_id: 8a5ec73b1a6dc440d85e3cb92cabbef1
    type: is_home

    It will never match, since the value returned from Tesla is Home (with capital H) and the condition will always evaluate to false

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

@gjohansson-ST gjohansson-ST added the integration: tesla removed integration label Sep 17, 2024
@home-assistant
Copy link

@c2ho5ohx2
Copy link
Author

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

@c2ho5ohx2
Copy link
Author

Did a workaround to match with OR, between "home" and "Home".
Here one execution of the automation:
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.1
    condition:
  • 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
  • condition: or
    conditions:
    • condition: device
      device_id: ac2308f19695082b51577ebdb4206785
      domain: device_tracker
      entity_id: 8a5ec73b1a6dc440d85e3cb92cabbef1
      type: is_home
    • condition: state
      entity_id: device_tracker.tesla_y_route
      state: Home
      alias: Test if Tesla Route is to Home(or home)
      action:
  • type: turn_on
    device_id: a4a186ff5bca2a117f4e94a083a598a2
    entity_id: 280baf5c14c07c3ee9193311d32d629a
    domain: switch
  • action: notify.mobile_app_sm_g780g
    metadata: {}
    data:
    message: Opening Garage Gate
  • action: light.turn_on
    metadata: {}
    data: {}
    target:
    device_id: 73132a89d28456c417a61df55dd2f047
  • action: onvif.ptz
    metadata: {}
    data:
    distance: 0.1
    speed: 0.5
    continuous_duration: 0.5
    preset: "1"
    move_mode: GotoPreset
    target:
    device_id: 00d02407139f1c3a146fcc1f77e0ca9f
  • action: camera.record
    metadata: {}
    data:
    duration: 120
    lookback: 10
    filename: /media/garage_front_door_{{now().strftime('%Y_%m_%d_%H_%M_%S_%f')}}.mp4
    target:
    device_id: 00d02407139f1c3a146fcc1f77e0ca9f
    mode: single

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.

@issue-triage-workflows
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@ciscojunkiebt
Copy link

I'm seeing this issue as well with a "wake up" automation that I have configured. Here is the condition state of a successful and a failed automation (notice the state of "Home" versus "home"):

SUCCESS
Result:
result: true
state: home <<<
wanted_state: home
entity: person.XXX

FAILED
Result:
result: false
state: Home <<<
wanted_state: home
entity: person.XXX

Similar to this post, it seems to randomly work, but I have no idea as to why.

https://community.home-assistant.io/t/home-vs-home-in-an-automation/325834

@github-actions github-actions bot removed the stale label Dec 19, 2024
@issue-triage-workflows
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@issue-triage-workflows issue-triage-workflows bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration: tesla removed integration stale
Projects
None yet
Development

No branches or pull requests

3 participants