Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

4
Code repetition - is it possible to skip?
Post Body

Hey. I have 10 GPIO doing the same thing with all the same options. Now I need to repeat sections like: switch, text_sensor, sensor, etc. 10 times. Each change forces me to change code in 10 places - is there a way to define a function or template to repeat code by passing some variables? It would be great for maintenance.

Author
Account Strength
90%
Account Age
6 years
Verified Email
Yes
Verified Flair
No
Total Karma
213
Link Karma
40
Comment Karma
173
Profile updated: 18 hours ago
Posts updated: 1 year ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
2 years ago