Child Temperature Sensor as Component in New App?

Do child devices not at all show up in custom devices handlers as components?

Details:
I have an aquarium light controller that I made with an esp32. It has 2 temperature sensors (one for the light and one for the tank). I have been able to control the light and get one temperature from SmartThings but I cannot seem to get a second temperature sensor to show up in the same device.

Things I have tried:

  1. One temp sensor as capability of device and one as a child device.
  2. Both sensors as child devices
  3. mcdSync:true
  4. Added component to deviceconfig

Experience:
The child device is created and has a temperature attribute which I can set. The temperature sensor shows up in Automations. I cannot get the sensor to show up as a component no matter what I do. Am I missing something or is it just not working?

I activity on this forum down or was this a bad question?

It’s a good question, you just posted in the wrong section of the forum. I’ve moved it over to where coders will see it.

I think the short answer is that the way parent/child Devices work is changed in the new architecture, but that’s about all I know, other people will have to go into the details.

1 Like

There’s also a current discussion going on with one of the very experienced DTH coders, @krlaframboise , and a staff member that might be relevant.

[DTH Multi-Component devices] Components not showing correctly

2 Likes

Thank you!

1 Like

Hi, there! Can you share your DTH’s source code, please? I’d like to see the metadata (capabilities, vid, etc.)
Also, take a look at the sample from another developer I included here.

1 Like

Ok, I finally got this to work. I refactored a bit of code and I think that I had mcdSync in the wrong place. All is working as expected now

2 Likes