The 'entity_id' option is deprecated?

Hi people.
I keep getting warnings like this.

Logger: homeassistant.components.template.sensor
Source: helpers/config_validation.py:779
Integration: template ([documentation](https://www.home-assistant.io/integrations/template), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+template%22))
First occurred: 0:22:04 (4 occurrences)
Last logged: 0:22:04

The 'entity_id' option is deprecated, please remove it from your configuration

I have already replaced, it seems to me, where it was possible all ā€˜entity_idā€™ to ā€˜unique_idā€™, tell me how to find the lines that swear HA

Check your template sensors, easiest would be using something like VSCode and search all your files for it.

Are your template sensors all in one place or distributed across multiple packages?

VScode is available only for 64bit HA (minority of installations I guess due to what is adviced by docs).

I would also like to see more verbose message in log. Current wording besides not pointing to exact entity which causes the issue, it not even gives a clue what it is about. It understable only for those who tracks release discussions

It was in the release notes breaking changes. Which at a minimum you should read.

2 Likes

Use a Samba Share to access your files from a Desktop with VS Code installed, problem solved.

As Tom pointed out already it was in the release notes, if you donā€™t read release notes, then itā€™s your problem.

1 Like

I know that but from discussion in release thread is obvious that for a lot of people itā€™s hard to understand how to cope with this issue.

Iā€™m not saying that people should not read changelog, but the log is not helping (itā€™s not the only case - it has been rised in WTH)

Also some might start with HA using later version but use some code examples found on forum. I wouldnā€™t blame him for not reading changelogs from the past

So you use an example from the forum, add it to your setup and once you restart youā€™ll see the error appear, then you know that itā€™s coming from this example.

Really?

Iā€™m not sure how much simpler you can get than this (direct quote from the release notes):

It is no longer necessary to provide a list of entities to monitor for each template platform as automatic analysis can now find all entities that affect the state in the template without manual setup.

This means you can now remove the entity_id option from your templates, as it is now deprecated.

I think it is more likely that people just didnā€™t read it.

1 Like

You are absolutely right, I did not read it, since I started using HA only from version 0.117.
But I am grateful to you for showing me where to get to know this.

1 Like

Isnā€™t me who said that? No reason to blame users. It should be motivation to improve logs instead.

Iā€™m pretty sure that itā€™s only available on 64bit (and non-Arm Architecture, ie x86, at that)
If you run VSC on a separate workstation, then your options are many, you donā€™t necessarily need to use samba (I do however) but instead use ftp or ssh (probably others too) but all these are a lot more ā€œfiddlyā€

Regardless Iā€™d say ā€˜what has this to do with the price of fish ?ā€™ ā€¦ but subsequent discussions talk about what newbies expect and Iā€™ve learnt that you canā€™t put any level of scope setting on that.

1 Like

my fault. It was meant 64b.
The point is that some users often suggest solutions which donā€™t work for majority. in this case, docs advices HA 32bit so not many users can gave VSC.

BTW I didnā€™t know I could instal VSC with HA integration on other machine than HA one. I cannot imagine a newcomer going for this option.

Except in that case it can work for just about anyone. You donā€™t have to use the addon, which is what was assumed. You can use VSCode on any PC and connect to home assistant (by any of the methods outlined above) to edit the files. Also I highly recommend it. Great editor.

2 Likes

The docs no longer ā€œrecommendā€ 32 bit
Not sure what that means for the future, I always thought it kinda weird to run 32b software on 64b architecture and you canā€™t address anything above 4GB (so a Pi4 8GB would be a waste of money)
Still, everyone should start comming into line (ie reducing the number of ā€˜supportedā€™ installation methods and platforms which should streamline support and development).
I will await developments but would expect 32b to go the way of the dodo before too long, having said that in print, I will noe probably be proved wrong
:rofl:

:+1:

Ahh I though VSC can help solving entity id issue. If not then I think every editor has search and replace function. But you one must know what and where to look at. Iā€™m sure most users starting HA jurney after 0.117 will have no idea about what and why is happening.

BTW, recently I migrated to 64b HA which gave me opportunity to try VSC. Itā€™s starting so slow on HA@rpi4 ā€¦ it caused I returned to default editor very quickly.

Yes but VSC makes it easy to search ALL files (in your instance)
Can have ā€œHome Assistant Context/Syntax Highlightingā€
Bracket checking
Indentation checking etc.
ā€¦ Probably others too

As Tom said : - Great Editor !

I didnā€™t know frenck had managed an Arm port - well done frenck :+1:
Try the install on a separate workstation, then itā€™s only limited by your pc hardware

It can if you have the Home Assistant Extension installed:

The rainbow indentation extension helps too. As do the extensions, rainbow brackets, mdi icons and spellcheck.

1 Like

Rainbow Spacing Too

@tom_l, Iā€™d not seen the mdi icons before, just went to install and there seems to be 3 of them.
Which is the preferred ?

Edit: I installed the ā€œMaterial Design Icons Intellisenseā€ by Lukas Troyer. It does all I could ask of it, Suggestions, autocomplete and ā€œaparentā€ enbeded preview (donā€™t worry though it doesnā€™t actually change the yaml file) :+1: Very Happy :smiley:

I must admit it looks very useful.
It encourages me to try VSC on PC connecting to HA remotely.
BTW shouldnā€™t the message be ā€œstring DOES match the pattern of deprecatedā€ ?

I am using Raspberry Pi OS Lite, and as I understand it is not available in the 64-bit version. Therefore, I use VSC on my laptop, and I connect to my Raspbery Pi4 via add-on Samba share

2 Likes