# Device Template inheritance

**URL:** https://forums.losant.com/t/device-template-inheritance/3451
**Category:** Feature Request
**Created:** [December 4, 2020, 3:03pm UTC](https://forums.losant.com/t/device-template-inheritance/3451 "2020-12-04T15:03:37Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![David\_Kjendal](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/david_kjendal/32/3082_2.png) [@David\_Kjendal](https://forums.losant.com/u/David_Kjendal)
#### Post date: [December 4, 2020, 3:03pm UTC](https://forums.losant.com/t/device-template-inheritance/3451/1 "2020-12-04T15:03:37Z")

</div>

It would be very useful to allow inheritance of Device Templates (ideally multiple parents, but at least one). This would make it much easier to create basic devices with a base/common attribute set if it changes have it flow automatically to children.

---

<div class="post-metadata">

### Author: ![Heath](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/heath/32/3036_2.png) [@Heath](https://forums.losant.com/u/Heath)
#### Post date: [December 4, 2020, 3:44pm UTC](https://forums.losant.com/t/device-template-inheritance/3451/3 "2020-12-04T15:44:52Z")

</div>

Hey @David_Kjendal,

Thanks for reaching out, and welcome to the Losant Forums!

This is a great idea, but to make sure I understand what you mean (and please correct me if I am wrong), you’re looking for children devices to inherit attributes from their parent devices?

In [Device Recipes](https://docs.losant.com/devices/device-recipes/) you can assign a Parent device in that recipe so that when you create a device from that recipe, that device will automatically be a child of that parent.

Please let me know if I understand your request correctly.

Thank you,  
Heath

---

<div class="post-metadata">

### Author: ![David\_Kjendal](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/david_kjendal/32/3082_2.png) [@David\_Kjendal](https://forums.losant.com/u/David_Kjendal)
#### Post date: [December 4, 2020, 5:00pm UTC](https://forums.losant.com/t/device-template-inheritance/3451/5 "2020-12-04T17:00:39Z")

</div>

What I’m talking about is purely related to device recipes. I’ve used the the device parent/child relationship (and it’s obviously important that the parent and child have some overlapping set of attributes). But I always create new devices from recipes, so I would like a “parent” recipe that includes all the common attributes and the “child” recipe would only contain attributes not present in the parent.

As I said, in a perfect world the child could have \>1 parent.

My use case would be something like this:  
I have a generic “environmental” sensor which always has Temperature and Humidity - so I want a recipe for that. But i have 2 enhanced sensor types, which have those attributes, but one adds pressure and the other light detection. So I want recipes for those that share the base T & H. When I create them by hand, its prone to spelling mistakes, etc for the attributes (obviously this is a simple version, but there are complex use cases). This is really helpful with system devices as well, which aggregate multiple sensor types together (i.e. the system is a room, with different kinds of sensors), inheriting the attributes in the templates of the possible sensor recipes is what would make it much easier.

---

<div class="post-metadata">

### Author: ![David\_Kjendal](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/david_kjendal/32/3082_2.png) [@David\_Kjendal](https://forums.losant.com/u/David_Kjendal)
#### Post date: [December 16, 2020, 3:26pm UTC](https://forums.losant.com/t/device-template-inheritance/3451/7 "2020-12-16T15:26:42Z")

</div>

In combination with [Request: synchronize devices with recipe](https://forums.losant.com/t/request-synchronize-devices-with-recipe/1849/12) this would be an extremely useful capability.
