Hi all, I want to something like ‘home assistant’ with such features:
-when door sensor changes check if motion sensor detected movement for last minute - if so then: turn off light, check weather and say it, check my upcoming events from google calendar and say them
-otherwise, turn on light and say how long I was away
-other voice notifications for movement events
So I expect these conditions to be pretty complex so I’m going to create my own integration. I started learning python so I think I see this task as to create some ‘box’ with input data (time events and events from movement and door sensor) and output data (another events on which I can subscribe in automation and do actions).
I don’t quite understand where to start. Which class I need to subclass to be able to read sensor events? How to emit my own events? Would be grateful for code examples
Yep, I agree with both Tink (though other syntax(es) are available ) and Burning.
Fairly trivial with minimal loading on the system, no issues with upgrades leaving your integration requiring major re-writes to keep up etc.
Do you have the names of the relevant entity_id’s ?
I’ve been (and still am partially) using AppDaemon for quite some time, but I’m now slowly moving everything over to native Home Assistant automations (@Mutt see, the day has finally come haha) because it’s just not worth the effort for me to keep it all up-to-date and for lots of automations using Python makes it more conplicated then it needs to be.
If you follow the example from @Tinkerer there are no ‘integrations’ required, they are all native calls.
@Burningstone, Good for you, even if it’s just an exercise to prove you can.
I would be interested in how your RAM CPU Page File etc. compares pre and post (though I accept that unless you can do the conversion in about 4 hours (I’d probably take about 4 weeks ) then it won’t be compared against the same functionality (stuff moves continuously) It will still be a worthwile test case. AND … What an achievement. Go for it