# Driver inheritance

**URL:** <https://community.homey.app/t/driver-inheritance/88574>\
**Category:** Developers\
**Created:** [September 1, 2023, 7:12pm UTC](https://community.homey.app/t/driver-inheritance/88574 "2023-09-01T19:12:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Baylife](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/baylife/32/83372_2.png) [@Baylife](https://community.homey.app/u/Baylife)\
**Post date:** [September 1, 2023, 7:12pm UTC](https://community.homey.app/t/driver-inheritance/88574/1 "2023-09-01T19:12:36Z")

</div>

Hi yall,

Been working on my first app.  
I have multiple drivers that have similar logic and therefore wanted to apply some inheritance to to reuse logic in a base driver.  
It can compile, but it aint working. Anybody got inheritance working? Or have found a workaround?

```auto
class BaseDriver extends Homey.Driver {
...
}

class MyDriver extends BaseDriver {
...
}

```

---

<div class="post-metadata">

**Author:** ![spkesDE](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/spkesde/32/54352_2.png) [@spkesDE](https://community.homey.app/u/spkesDE)\
**Post date:** [September 1, 2023, 7:24pm UTC](https://community.homey.app/t/driver-inheritance/88574/2 "2023-09-01T19:24:20Z")

</div>

> <https://github.com/spkesDE/com.spkes.vesync/blob/master/drivers/classic300s/device.ts>

> <https://github.com/spkesDE/com.spkes.vesync/blob/master/lib/HumidifierDeviceBase.ts>

It should also work with Drivers, but I’ve never tested it.

---

<div class="post-metadata">

**Author:** ![Baylife](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/baylife/32/83372_2.png) [@Baylife](https://community.homey.app/u/Baylife)\
**Post date:** [September 1, 2023, 7:43pm UTC](https://community.homey.app/t/driver-inheritance/88574/3 "2023-09-01T19:43:40Z")

</div>

> [@spkesDE](#):
>
> `Classic300s `

Ty for some reason the base should be marked as default for it not and not just regular export.

---

<div class="post-metadata">

**Author:** ![donkfather](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/donkfather/32/81191_2.png) [@donkfather](https://community.homey.app/u/donkfather)\
**Post date:** [February 6, 2024, 3:25pm UTC](https://community.homey.app/t/driver-inheritance/88574/4 "2024-02-06T15:25:09Z")

</div>

Did you manage to fix it ?
