Home Assistant commiseration thread

Status
You're currently viewing only Mark086's posts. Click here to go back to viewing the entire thread.
So, per the Smarthome Automation thread, I was in the process of migrating the remainder of my devices off Insteon to Z-Wave (since Insteon integration is a paid service in Home Assistant). I have a Home Assistant server running (not with any of my devices yet, just the basics), but this thread is starting to make me want to stick to my current system. Dashboards aren't pretty, but the software is 100% accessible from Python, or you can chose to integrate Python scripts directly.

I mean below is a very simple script to chose which blinds to close based on whether or not we have guests. It's a button on the dashboard for the evening, and runs automatically the open version at Sunrise. Other than linking it to a time (sunrise) or a button - everything can be handled in Python.

Python:
guest_mode = indigo.variables[1739085701]
indigo.server.log(f"{guest_mode.value}")
if guest_mode.value == "false":
    indigo.device.turnOff(748881128) #Master Bedroom Close
    indigo.device.turnOff(603693808) #Blue Close
    indigo.actionGroup.execute(329565976) #Dining Room Close
    indigo.device.turnOff(44168682) #Exercise Room Close
    indigo.actionGroup.execute(1083429978) #Kitchen Nook Close
else:
    indigo.device.turnOff(748881128) #Master Bedroom Close
    indigo.actionGroup.execute(329565976) #Dining Room Close
    indigo.device.turnOff(44168682) #Exercise Room Close
    indigo.actionGroup.execute(1083429978) #Kitchen Nook Close
Ever heard of constants?
 
It was a gradual approach and it grew organically.

I know how that happens, and it really wasn't intended as a criticism. I could sit here and redesign a number of aspects of it, and while I might like the final results, I'm not really the one working with it anyway.

I've had plenty of stuff grow over time and then redesign it when it hits a certain level of complexity. The more it looks like spaghetti or a jenga tower the more likely I am to revisit it.

While the ids might not change often; they'll change if you have to replace the hardware, so eventually you'll have to revisit the files to replace a controller here or there. Much nicer if the pre-work shifts all that to one place for future simplification.

(You don't really want to be restructuring it at the same time as your replacing multiple components for instance. Better to know it's all working and tested over time).
 
Status
You're currently viewing only Mark086's posts. Click here to go back to viewing the entire thread.