Very new to Home Assistant, trying to avoid much yaml editing. Using the UI I’m trying to get an automation to only trigger when a particular device tracker shows as home. I’m seeing an issue with capitalization. I can’t make the condition case match what the entity state will be.
This is what I’m typing into the UI:
This is what I see when I “SHOW TRACE”:
Result:
result: false
state: Home
wanted_state: home
I can’t get the wanted_state to be Home. Is this a bug or am I missing something?
jazzyisj
(Jason)
July 30, 2021, 9:44pm
2
The state should be “home”, no caps. The UI automatically changes it to “Home” in the front end to make it pretty. You can use the dev tools states tool to check of the states of an entity is represented in the back end.
Doing nothing but wait caused the wanted_state to register as “Home”. Odd.
Same here. I found this open issue and commented on it
opened 07:57PM - 15 Sep 24 UTC
integration: tesla
stale
### 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
```yaml
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?
```txt
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_