Corrected indentation and standardized examples (#8130)

This commit is contained in:
Marat Levit 2019-01-12 07:04:25 +11:00 committed by Fabian Affolter
parent b39b9db770
commit 0b684012e2

View File

@ -107,7 +107,7 @@ Note that the SQL sensor state corresponds to the last row of the SQL result set
This example only works with *binary_sensors*:
```sql
SELECT * FROM states WHERE entity_id='binary_sensor.xyz789' GROUP BY state ORDER BY last_changed DESC LIMIT 1;
SELECT * FROM states WHERE entity_id = 'binary_sensor.xyz789' GROUP BY state ORDER BY last_changed DESC LIMIT 1;
```
### {% linkable_title Database size %}
@ -116,7 +116,8 @@ SELECT * FROM states WHERE entity_id='binary_sensor.xyz789' GROUP BY state ORDER
{% raw %}
```yaml
- platform: sql
sensor:
- platform: sql
db_url: postgresql://user:password@host/dbname
queries:
- name: DB size
@ -131,7 +132,7 @@ SELECT * FROM states WHERE entity_id='binary_sensor.xyz789' GROUP BY state ORDER
{% raw %}
```yaml
sensor:
- platform: sql
- platform: sql
db_url: mysql://user:password@localhost/hass
queries:
- name: DB size