On Mon, 30 Sept 2024 at 09:36, Karen K <[email protected]> wrote: > > Such a service would look like this: > > *class *YourService(StdService): > > > *def *__init__(self, engine, conf_dict): > > super(YourService,self).__init__(engine, conf_dict) > > self.wind_readings_cache = [] > > self.bind(weewx.NEW_LOOP_PACKET, self.new_loop_packet) > > > *def *new_loop_packet(self, event): > > wind = event.packet.get('windSpeed') > > if wind is not None: > > # do some calculations involving self.wind_readings_cache > > event.packet['windSpeedAvg'] = ... > > > This is a rough sketch. There are more details to consider to complete it. >
Thank you! That gives me an excellent head start on how to write a service. I will give it a go later. -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/CANF1Pgtj1grQmx64kz6pEA0zY0P7F_i%2BQnHbkD%3DQ0yMHjtZscA%40mail.gmail.com.
