Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Log warning when entities referenced in service call not found #31427
Service calls that reference non-existing entities will now log warning instead of silently being omitted. If you are using a template and want to select no entities, pass
The TTS integration will no longer target all media players if no entity ID passed in. Specify
Now that we restore entities on boot, we can be sure that entities will exist. This means that we can start
This is a RFC because the impact is unknown. If we want to move on with this idea, we could start with just printing a warning instead of failing.
Type of change
If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
The integration reached or maintains the following Integration Quality Scale:
I can tell you that this will cause a lot of breakage.
I've seen and been involved in many discussions on the forum where the solution to a tricky problem is to use a non-existing
Granted, this is not documented behavior, but it's been that way so long that it has become a de facto solution.
Maybe to allow that same use case accept a new keyword for
@balloob, yes, for scripts that is an acceptable solution and one that I've often suggested.
However, maybe I used a poor example, because I've seen the same scenario with other entities, like lights, switches, etc., when you need to determine the entity to act upon via a
I'm pretty much in agreement with @pnbruckner. Without an option like 'none' or 'no-entity' for entity_id, people would have to create many 'dummy' objects. Imagine trying to do that for media_player. Template media_player doesn't exist, so it would be impossible.
Ignore as the logger: config can take care of my concern.
pnbruckner left a comment
Looks good to me. I was surprised, though, how many files had to be changed to implement this. But after looking at the changes, I guess I shouldn't have been. Sounds like an opportunity for some refactoring someday.