Home Assistant Community

Custom_component: breaking_changes

#1

breaking_changes

Component to show potential breaking_changes in the current published version based on your loaded components.

This component will set up the following platforms.

Platform Description
binary_sensor Show a boolean value if there is a potential issues with your configuration before upgrading.
sensor Show info about potential issues with your configuration before upgrading.

Installation

  1. Using the tool of choice open the directory (folder) for your HA configuration (where you find configuration.yaml).
  2. If you do not have a custom_components directory (folder) there, you need to create it.
  3. In the custom_components directory (folder) create a new folder called breaking_changes.
  4. Download all the files from the custom_components/breaking_changes/ directory (folder) in this repository.
  5. Place the files you downloaded in the new directory (folder) you created.
  6. Add breaking_changes: to your HA configuration.

Using your HA configuration directory (folder) as a starting point you should now also have this:

custom_components/breaking_changes/__init__.py
custom_components/breaking_changes/binary_sensor.py
custom_components/breaking_changes/const.py
custom_components/breaking_changes/sensor.py
custom_components/breaking_changes/manifest.json

Example configuration.yaml

breaking_changes:

Configuration options

Key Type Required Default Description
name string False Potential breaking changes Custom name for the entities.

Contributions are welcome!

If you want to contribute to this please read the Contribution guidelines


14 Likes
Request for "Breaking Changes" to be a stickied topic under configuration
#2

I think this is a fantastic idea and should be included in the standard config so we can stop (or reduce) the flood of “you broke me HA, now the dog can’t turn on the nightlight” posts with every release.

I do want to report something though, mine reports

22175: {
  "component": "homeassistant",
  "prlink": "https://github.com/home-assistant/home-assistant/pull/22175",
  "doclink": "https://www.home-assistant.io/components/None",
  "description": "removed iliad "
}
version: 0.91.0
friendly_name: Potential breaking changes
icon: mdi:package-up

Trouble is I don’t have the iliad component loaded, in fact I have never heard of it. Is that supposed to happen?

4 Likes
#3

This is expected, as you can tell from the attribute it is registered as the homeassistant “component” and you certainly have that :slight_smile:

#4

YES please!

Breaking Changes are a real issue in HA (which is absolutely NOT a judgement). Anything that might reduce the

is very welcome!

2 Likes
#5

Understood, thank you.

#6

@ludeeus, this is awesome! Please, submit a pull request for integrating this fully on hassio!

BTW, @nickrout, I have that same issue on my 0.91.1 hassio.

How can we solve it?

Thanks.

#7

How does it work?

Is it getting the information directly from Issues (marked with appropriate tags) in Home Assistant’s GitHub repo?

How far does it look ahead? There are examples of upgrades on this forum by users who, in one step, have jumped 6 or more versions.

I agree this should be incorporated into the standard release. Users who don’t read Releases Notes, and skip 6 versions, aren’t likely to install a custom component.

In fact, for maximum visibility and minimal effort (no component or sensors to configure), this functionality should be accessible from Home Assistant’s Info page (or a related administrative page). One glance at that page and you get an idea of how many ‘breaking changes’ there are between the version you’re using and the latest one.

1 Like
#8

I installed the component yesterday and I think it’s a great idea and will be very useful.

But in the list is included the following:

22152: {
  "component": "ios",
  "prlink": "https://github.com/home-assistant/home-assistant/pull/22152",
  "doclink": "https://www.home-assistant.io/components/ios",
  "description": "Change ATTR_BATTERY_STATE_UNPLUGGED for ios component "
}
22336: {
  "component": "google_assistant",
  "prlink": "https://github.com/home-assistant/home-assistant/pull/22336",
  "doclink": "https://www.home-assistant.io/components/google_assistant",
  "description": "Google assistant: add blinds trait for covers "
}

I’ve double checked my configuration.yaml and I don’t have either of those components included. unless my google calendar entries are being picked up as google_assistant?

are those some sort of a default config entry (and I don’t use “default_config:” or whatever the new entry is) or where else does the component look for installed components?

#9

For the time being I will not do this, it will require a lot more testing, and I’m not sure that this is something that have a place as a core component, you can fully use it as a custom_component, there is nothing different about how it would work.

I have added a small section about that in the readme in that repo now.
https://github.com/custom-components/breaking_changes#how-it-works

Currently it only look for the current stable version, for multiple reasons, the biggest one I did this in 1hour last night, but I plan on adding support to list changes between your installed version and the latest stable version.

Maybe someone will see this and implement that :tada:

@finityI just published version 0.0.4 of this that should fix that issue.

2 Likes
#10

Looks really interesting. Would the provided information be different from the Hassio Check Home Assistant Configuration add-on, or is the main advantage in comparison (if you’re a Hassio user) simply that the info is available as a sensor?

#11

Scratch that, it’s now added https://github.com/custom-components/breaking_changes/releases/tag/0.1.0

You are comparing apples and skateboards here.
That addon checks your configuration to make sure it’s valid, this component gives you a list of potential problems.
I believe that there is room for both, and if you are running hassio you should not do an update without running that addon.
This component would be useful to include in notifications and potentially a custom lovelace card :man_shrugging:

#12

Apparently iliad_italy is a platform that was removed by this PR: 22175 due to stability problems. My guess it’s being reported as a breaking change (even if you never used it) because it’s tagged under the (very broad) heading of ‘homeassistant’.

On GitHub, the Issue was tagged correctly and does indicate remove-platform and integration: iliad_italy.

However, this level of detail isn’t revealed at the level of the Breaking Changes list for 0.91. You have to dive into the associated PR and read its tags. I don’t imagine it would be easy to do this with web-scraping.

#13

Yes, I and others have said this for a long time in other threads.

Hmm… Let’s hope so. Finally. :stuck_out_tongue_winking_eye:

#14

Correct, and it’s me that does that tagging.
It is returned by my scraper as None. if it returns None for a breaking_cahnge I assume it is something that changed in homeassistant (they are usually not tagged to a specific integration.
The alternative would be to hide all this, but then stuff like the slugify change we saw a couple of releases back that changed a lot of entity_ids also be hidden.
I believe that this is an acceptable tradeoff.
The default name of the sensors are “Potential breaking changes” so I’m covered there at least :smile:

#15

Not sure if it makes sense or not, but any chance that we could have an exclude?
Such as:

breaking_changes:
  exclude:
    - 22175
#16

It could work but I don’t see that as a valuable option.

Config changes require restarts, starting with 0.1.0 of this component if will only show things if there is a newer version published.
So adding / using an option like that would be too much work on the user.

#17

Does this show up in the tacker-card? I am guessing yes from this

image

But it doesn’t show up in mine. I installed it about 12 hours ago and several restarts today. Is there anything else I need to do?

#18

It should, but there are several issues blocking that ATM

#19

Thanks. Got it re comparison between this and the Hassio Check Home Assistant Configuration add-on…

#20

I am new to Custom_Updater, what URL did you add to your component_url?
And is there a way to know that from the github page?