mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-26 10:46:51 +00:00
Fix "Previous state of an entity" YAML example (#21268)
This commit is contained in:
parent
b98748ce11
commit
4b8ea3ed53
@ -117,7 +117,7 @@ sensor:
|
|||||||
- platform: sql
|
- platform: sql
|
||||||
queries:
|
queries:
|
||||||
- name: Former_Temperature_In
|
- name: Former_Temperature_In
|
||||||
query: "SELECT * FROM (SELECT state FROM states WHERE entity_id = 'sensor.temperature_in' ORDER BY state_id DESC LIMIT 2) two_entity ORDER BY state_id ASC LIMIT 1;"
|
query: "SELECT * FROM (SELECT state, state_id FROM states WHERE entity_id = 'sensor.temperature_in' ORDER BY state_id DESC LIMIT 2) two_entity ORDER BY state_id ASC LIMIT 1;"
|
||||||
column: "state"
|
column: "state"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user