0.63: Entity Registry, SQL Sensor, Mercedes cars

![](upload://dO9uXVR8PZAroSj1l9cKImxAzPs.png)

Date set for dropping Python 3.4 support

As announced in October, we’re going to drop Python 3.4 support in 2018. We’ve now decided that in two releases, 0.65, the minimum Python version that will be supported is bumped to 3.5.3. This won’t impact most users. You are already fine if you’re using Hass.io, the latest Debian stable (Stretch) or a derivative of that (Raspbian, Ubuntu).

Entity Registry

This release introduces the entity registry. The entity registry allows integrations to reserve entity IDs. This means that we’ll automatically grant an entity ID to a device. It’s reserved so that no other device will ever get that entity ID. It also means that as a user, you will be able to customize the entity IDs for these devices.

For an integration to leverage the entity registry, it needs to define a unique ID for each of their entities. A unique ID is something that we can uniquely identify the device and that is not configurable. So a serial number and mac address are ok, IP addresses or names are not.

Examples of integrations that have unique IDs defined in this release are Z-Wave, Hue, Nest, LIFX, Sonos, Apple TV.

To update the entity ID that will be assigned to your device, update <config>/entity_registry.yaml and restart Home Assistant (reloading on the fly is planned for a future release).

The entity registry will assign an entity ID the first time that a device is seen. This should be the same entity ID as it always was before. If this is not the case, update the registration entity to change it back to the old entity ID.

We’re planning a lot of cool stuff around the entity registry. Stay tuned!

New Platforms

If you need help…

…don’t hesitate to use our very active forums or join us for a little chat. The release notes have comments enabled but it’s preferred if you use the former communication channels. Thanks.

Reporting Issues

Experiencing issues introduced by this release? Please report them in our issue tracker. Make sure to fill in all fields of the issue template.

Breaking Changes

  • updated sensor name (@philklei - #12084) (sensor.tahoma docs) (breaking change)
  • Originally Canary camera is added per location and only displays an image that was captured due to motion. Now it is per device (each location can have multiple devices) with live stream support. (@snjoetw - #11949) (canary docs) (camera.canary docs) (breaking change)
  • Avoid influxdb filling connection pool: The influxdb retry_queue_limit configuration variable no longer has any effect and can be removed. (@amelchio - #12182) (influxdb docs) (breaking change)
  • Some spelling mistakes in default entity names have been fixed in (@OttoWinter - #12041). This is causing these entity_id changes:
    • Seven segments display: image_processing.seven_segement_ocr_[...]image_processing.seven_segment_ocr_[...]
    • Rain Bird Switch: switch.sprinker_[...]switch.sprinkler_[...]
    • OpenEVSE Sensor: sensor.ambient_termperaturesensor.ambient_temperature
    • Fido: sensor.[...]_internaltional_remainingsensor.[...]_international remaining
  • From version 0.64, Home Assistant will by default purge recorded state history that is older than 10 days. If you want to keep your recorded data for longer than that, you must configure the number of days to retain:
      recorder:
        purge_keep_days: 30
    

    If you want to keep the previous default of never deleting history, use this configuration:

      recorder:
        purge_interval: 0
    

    (@amelchio - #11976)

  • Fix duplicate entity_ids in System Monitor (@fanaticDavid - #12124) (sensor.systemmonitor docs) (breaking change)

    Resource Old Entity ID New Entity ID disk_use sensor.disk_used sensor.disk_use load_15m sensor.average_load_15m sensor.load_15m load_1m sensor.average_load_1m sensor.load_1m load_5m sensor.average_load_5m sensor.load_5m memory_free sensor.ram_available sensor.memory_free memory_use sensor.ram_used sensor.memory_use network_in sensor.received sensor.network_in network_out sensor.sent sensor.network_out packets_in sensor.packets_received sensor.packets_in packets_out sensor.packets_sent sensor.packets_out processor_use sensor.cpu_used sensor.processor_use swap_use sensor.swap_used sensor.swap_use
  • Developers only: Following EntityComponent methods have been removed: extract_from_service, async_update_group, async_reset, prepare_reload (@balloob - #12237) (breaking change)

All changes


This is a companion discussion topic for the original entry at https://home-assistant.io/blog/2018/02/10/release-63/
2 Likes

Another boatload of changes! Awesome!

Regarding this one…
zha: Add support for XBee radios (@rcloran - #12205)

If I read this correctly, you can only use one radio type at a time. Correct?

Thanks!

Should the entity registry ignore entity_namespace? (I am using entity_namespace to append “plex” & “sonos” to media_players but this was ignored by the entity registry)

Also, in hue I use the setting to allow_hue_groups and although they show as entities in the frontend these groups don’t show up in the registry - wondered if that’s expected behaviour?

Great work as always,
Thanks,
James

Nice update, just tested the mercedes me component. Seems there is couple issues/bug?

The latest trip information is reporting strange number. Also the fuel range is not reporting any data.

image
image

1 Like

Seems like this release broke OpenZWave, according to this issue. I’m seeing the same here, with both Python 3.5 and 3.6.

hi,

thanks for testing this.

The shown number is the latest trip id. I’ve used this as a “travel book” in the last month and not as a real indicator. If you would like to get the “distance traveled” you could use a template sensor

For the fuel range issue, could you please click here, logon with your mercedesme account and search for fuelRangeKm.

Thanks for your feedback and help to make this component better.

BR
Rene

How do use the travel book in general?

Ok, logged on, strange that it’s not reporting the value in the api:
“fuelRangeKm”:"NOT_PRESENT
“fuelRangeKm”:null

Can you make like a formula to calculate based on the latest consumption data if data is ‘not_present’ or ‘null’?
“liquidConsumptionReset”: 7.599999904632568,
“liquidConsumptionStart”: 8.800000190734863,

No problem with z-wave here, running hass.io

I’ll add a fix to make sure we can register them taking entity namespace into consideration. For the ones that are already registered you’ll need to update the entity id yourself.

If it doesn’t work for Hue groups, it means that we don’t have a unique ID set for them yet.

1 Like

Same here. openZwave is broken. Reinstalling the previous version now.

Hi,

I’m exporting the results out of the states table currently.

Example: select state, attributes, last_changed from states where entity_id = 'sensor.latest_trip' group by state

The idea for the future is:

  • Have an automation that fires an event after a trip has completed.
  • Collect the GPS information out of the database for the start and end time
  • reverse lookup the address for start and end
  • take the information and add a line in a google sheet

To the fuelRange problem:

  • in the next version I’ll check availabilities and hide unavailable sensors
  • could you please explain your formula idea a little bit?

Thx
Rene

1 Like

no issues with open zwave on a raspbian install coming from 0.61

Hi there,

Thanks for another version, and this one fixed the xiaomi power strip. Great. But I did find something like a breaking changing: I use to write my automations directly by editing files in a automation folder and use to write a file for each xiaomi wireless button that I have. So, I ended with a few automations with the same alias, like “toggle hall light” for the single click of the buttons on each end of the hall. After upgrading to the 0.63 some of these automations just stopped to work!

After a lot of checks of buttons, batteries, etc, I thougth about the entity registry thing and had the idea of adding unique IDs for each automation with the “id:” and it seems to solve the problem (there was one that I had to change the alias too, but I’m not sure… should be another mistake). Should a note be added to the breaking changes?

Possibly it’s due to the cython package being missing - others have reported it as a hidden error. Try activating the venv and doing pip install cython.

Unfortunately Cython is not missing. If I remove all “zwave” files from the libs, HA installs them and I don’t see any difference between those used by 0.62.1 and 0.63 :confused:

Edit:
For some reason, if I do a make update && make build && make install-api on the python-openzwave checkout (with my venv active) it is working just fine.

is it me, or xiaomi vacuum still doesn’t work?

My Xiaomi vacuum is not working either. Downgrading back to .60 right now. Same error as others here

TypeError: subcon should be a Construct field

No problems with zwave though.

edit: and after downgrading, it’s back

It’s working well for me. Upgraded from 0.62.1 (which didn’t worked) to 0.63.

I also came from 0.62.1, but can’t discover the vacuum now [I also couldn’t on 0.62.1].
I’m assuming that you did not change anything in configuration? just plain update and it works out-of-the-box?

Xiaomi purifier and vacuum both not working here either 0.63

2018-02-11 18:39:28 ERROR (MainThread) [homeassistant.components.vacuum] Error while setting up platform xiaomi_miio
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 84, in async_setup
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
    return fut.result()
  File "/usr/lib/python3.6/asyncio/futures.py", line 245, in result
    raise self._exception
  File "/usr/lib/python3.6/asyncio/tasks.py", line 180, in _step
    result = coro.send(None)
  File "/usr/lib/python3.6/asyncio/coroutines.py", line 210, in coro
    res = func(*args, **kw)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/vacuum/xiaomi_miio.py", line 90, in async_setup_platform
    from miio import Vacuum
  File "/usr/lib/python3.6/site-packages/miio/__init__.py", line 2, in <module>
    from miio.protocol import Message, Utils
  File "/usr/lib/python3.6/site-packages/miio/protocol.py", line 179, in <module>
    Const(0x2131, Int16ub),
  File "/usr/lib/python3.6/site-packages/construct/core.py", line 1894, in __init__
    super(Const, self).__init__(subcon)
  File "/usr/lib/python3.6/site-packages/construct/core.py", line 291, in __init__
    raise TypeError("subcon should be a Construct field")
TypeError: subcon should be a Construct field