Site updated at 2017-10-23 14:40:29 UTC

This commit is contained in:
Travis CI 2017-10-23 14:40:29 +00:00
parent 01a801c9e0
commit 56a4e7ae0b
28 changed files with 69 additions and 68 deletions

View file

@ -93,11 +93,11 @@
<p class="note warning">
This component has been modified to work with devices with multiple sensors which will cause a discontinuity in recorded values. Existing devices will receive a new ID and therefore show up as new devices.
If you wish to maintain continuity it can be resolved in the database by renaming the old devices to the new names.
Connect to your database using the instructions from <a href="https://home-assistant.io/docs/backend/database/">home-assistant.io/docs/backend/database/</a>. Check the names of sensors:
Connect to your database using the instructions from <a href="https://home-assistant.io/docs/backend/database/">home-assistant.io/docs/backend/database/</a>. Check the names of sensors:<br />
<code class="highlighter-rouge">sql
SELECT entity_id, COUNT(*) as count FROM states GROUP BY entity_id ORDER BY count DESC LIMIT 10;
</code>
Alter the names of sensors using the following examples:
Alter the names of sensors using the following examples:<br />
<code class="highlighter-rouge">sql
UPDATE states SET entity_id='sensor.&lt;sensor_name&gt;_temperature' WHERE entity_id LIKE 'sensor.&lt;sensor_name&gt;%' AND attributes LIKE '%\u00b0C%';
UPDATE states SET entity_id='sensor.&lt;sensor_name&gt;_pressure' WHERE entity_id LIKE 'sensor.&lt;sensor_name&gt;%' AND attributes LIKE '%mb%';