# How to deprecate standard capabilities when upgrading to a newer/better standard capability

**URL:** <https://community.homey.app/t/how-to-deprecate-standard-capabilities-when-upgrading-to-a-newer-better-standard-capability/137526>\
**Category:** Developers\
**Created:** [June 3, 2025, 7:40am UTC](https://community.homey.app/t/how-to-deprecate-standard-capabilities-when-upgrading-to-a-newer-better-standard-capability/137526 "2025-06-03T07:40:51Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![DaanLeenders](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/daanleenders/32/134990_2.png) [@DaanLeenders](https://community.homey.app/u/DaanLeenders)\
**Post date:** [June 3, 2025, 7:40am UTC](https://community.homey.app/t/how-to-deprecate-standard-capabilities-when-upgrading-to-a-newer-better-standard-capability/137526/1 "2025-06-03T07:40:51Z")

</div>

I have a application for Fiat cars. And want to update it to better support the Homey Energy tab, as is suggested in a review of a newer version I just released.

They suggest to set the battery `electricCar` property to `true`. Which I can do without any issues. But they also suggest to add the `ev_charging_state` which replaces both the standard capability `battery_charging_state` as my custom capability `fiat_vehicle_state_plugged_in`.  
Basically it is this change

> <https://github.com/daanleenders/homeyfiatuconnect/pull/7/files#diff-d6f674f8fdab0c40c811835aa0b0eb2444caac616c1c747ae2c78d6561ed698a>
>
> Also implemented the new \`ev\_charging\_state\`, deprecated my custom flows for plu…gged in state and hidden the capability from the insights and sensors view.
> 
> resolves #6

I can deprecate the custom flows of the custom capability and make sure that it doesn’t show up in a uiComponent or in the insights. But I cannot find a way to deprecate the usage of the standard `battery_charging_state`.

And the main issue is that the flow for the trigger of a change to its state is visually exactly the same as the new one for the `ev_charging_state` .You will need to choose between these 2 flows. Where one only has options for charging/discharging and the other also has options for if the car is (not) plugged in. But there is absolutely no difference when you need to select which ones to use, which will confuse people when selecting a trigger for their flow.  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/b/5/b5c36f55b826561d9810d6480b40acefbfdafef7.png)

Does anyone know how to hide flow actions and the ui component that belong to a standard capability (like `battery_charging_state`) without removing that capability completely and potentially breaking people’s flows?

---

<div class="post-metadata">

**Author:** ![RonnyW](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ronnyw/32/10879_2.png) [@RonnyW](https://community.homey.app/u/RonnyW)\
**Post date:** [June 3, 2025, 10:11pm UTC](https://community.homey.app/t/how-to-deprecate-standard-capabilities-when-upgrading-to-a-newer-better-standard-capability/137526/2 "2025-06-03T22:11:53Z")

</div>

A suggestion:  
If you create a custom capability with the same name “ev\_charging\_state”,.it should overwrite the standard capability and its flows. If you don’t register your own flow triggers, there will be no flow trigger for that capability.

I will try the same for my app (Tesla)

- use a custom capability for “ev\_charging\_state”
- hide this capability in sensor screen
- continue using the existing charging state capability becaue it has more enum states. That means the app keeps existing functionality and the new capability is only used for HomeyEnergy

That’s theory so far…haven’t testet yet.

---

<div class="post-metadata">

**Author:** ![DaanLeenders](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/daanleenders/32/134990_2.png) [@DaanLeenders](https://community.homey.app/u/DaanLeenders)\
**Post date:** [June 6, 2025, 7:25pm UTC](https://community.homey.app/t/how-to-deprecate-standard-capabilities-when-upgrading-to-a-newer-better-standard-capability/137526/3 "2025-06-06T19:25:17Z")

</div>

I did not expect that I could create a custom capability with the same name as a default one to effectively overrule the default one. So I will try that.

But I would change it from overruling the new `ev_charging_state` to overruling the old `battery_charging_state`. Because your third remark (“becaue it has more enum states”) isn’t correct the new ev\_charging state has more states and those overlap completely with the old ones.

But this would need some testing since i would also need to implement the existing flows for the battery\_charging\_state to make sure I can deprecate it instead of completely removing the flow cards to prevent breaking the flows of users.

I will test and keep you posted of my findings

---

<div class="post-metadata">

**Author:** ![RonnyW](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ronnyw/32/10879_2.png) [@RonnyW](https://community.homey.app/u/RonnyW)\
**Post date:** [June 6, 2025, 8:21pm UTC](https://community.homey.app/t/how-to-deprecate-standard-capabilities-when-upgrading-to-a-newer-better-standard-capability/137526/4 "2025-06-06T20:21:39Z")

</div>

> [@DaanLeenders](#):
>
> overruling the old `battery_charging_state`

Are the users already using this capability/flows? Then overruling will break these flows. Your custom capability flow definitions will get a new ID.

---

<div class="post-metadata">

**Author:** ![DaanLeenders](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/daanleenders/32/134990_2.png) [@DaanLeenders](https://community.homey.app/u/DaanLeenders)\
**Post date:** [June 6, 2025, 8:29pm UTC](https://community.homey.app/t/how-to-deprecate-standard-capabilities-when-upgrading-to-a-newer-better-standard-capability/137526/5 "2025-06-06T20:29:14Z")

</div>

I would expected something like that to happen. But that is also why I did not expect overruling the default capability to be allowed (i thought it would create 2 different battery\_charging\_state capabilities)

I just tested it by adding the 2 flows of the default `battery_charging_state` and then updating my app from the latest app store version to a local dev version.

When I did not define flows for the overruled battery\_charging\_state the flows broke and the flow cards would not show up.

But when I copied the 2 flow definitions from [Tutorial: Device Capabilities - Homey Apps SDK v3](https://apps-sdk-v3.developer.homey.app/tutorial-device-capabilities.html) `battery_charging_state` and marked them as deprecated. Then build a new dev version of the app. The flows seemed to be restored and the flow cards just showed up in place of the ones I created before defining `battery_charging_state` myself.

So I deduced that this would work as a way of deprecating an default capability and added it to my app [Add the default `battery_charging_state` and it flows to deprecate it · daanleenders/homeyfiatuconnect@17056a0 · GitHub](https://github.com/daanleenders/homeyfiatuconnect/commit/17056a082f5a75c0e31cd6e7a7ad9e7b730b5b9f)

I was just about to mark it as a new minor version and submit it like this to Homey

---

<div class="post-metadata">

**Author:** ![DaanLeenders](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/daanleenders/32/134990_2.png) [@DaanLeenders](https://community.homey.app/u/DaanLeenders)\
**Post date:** [June 6, 2025, 9:22pm UTC](https://community.homey.app/t/how-to-deprecate-standard-capabilities-when-upgrading-to-a-newer-better-standard-capability/137526/6 "2025-06-06T21:22:35Z")

</div>

I uploaded a new version to Homey and asked them in the certification step for any guidance on how best to do this.

---

<div class="post-metadata">

**Author:** ![DaanLeenders](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/daanleenders/32/134990_2.png) [@DaanLeenders](https://community.homey.app/u/DaanLeenders)\
**Post date:** [June 13, 2025, 8:51am UTC](https://community.homey.app/t/how-to-deprecate-standard-capabilities-when-upgrading-to-a-newer-better-standard-capability/137526/7 "2025-06-13T08:51:14Z")

</div>

I got a response from Homey on my app submission with the deprecation as we discussed. They also provided a alternative way to deprecate but I personally feel that the alternative needs to much manual effort from the current users.

Their alternative:

> But to give another option that should allow people to migrate in way that is used more often, You could add the new capability only to new pair sessions. This way the feature is available as the new standard for all new users, and if current users want to use it, they can reconnect their driver. Users who do not want to migrate can still use the current capability until they reconnect their device.
> 
> By deprecating the flow cards users can still use their current flows without breaking them, but cannot create new ones. This way people can migrate in their own pace.
