How to optimize my function with subscribe in mind

image
My idea to optimize this is to make a function that gets device “name” as a variable, and then I could make this a single function. My problem is that I don’t know what parameter I should put inside my function brackets, and how to connect that function to Subscribe?

Hey, this answer could help you!

1 Like

Yea that’s exactly what I needed Thanks :smiling_face_with_three_hearts:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.