utilities/tp-link-to-influxdb#5: Allow either kasa to tapo to be omitted from config



Issue Information

Issue Type: issue
Status: closed
Reported By: btasker
Assigned To: btasker

Milestone: v0.24
Created: 20-May-23 21:53



Description

Currently, if a user only has one type of device, their config still needs to include an object for the other - otherwise the script will throw an exception (see https://github.com/bentasker/tplink_to_influxdb/issues/1).

We should allow either to be omitted entirely



Toggle State Changes

Activity


assigned to @btasker

verified

mentioned in commit github-mirror/tplink_to_influxdb@2caaf45c238bef2a5f48a480d16c1e6da5cfc9e9

Commit: github-mirror/tplink_to_influxdb@2caaf45c238bef2a5f48a480d16c1e6da5cfc9e9 
Author: B Tasker                            
                            
Date: 2023-05-20T22:56:21.000+01:00 

Message

Check that at least one of tapo or kasa has been defined - if not, return an error (utilities/tp-link-to-influxdb#5)

+4 -0 (4 lines changed)
verified

mentioned in commit github-mirror/tplink_to_influxdb@a73bb6efca1d60de59139c87cc954e58b0b49e45

Commit: github-mirror/tplink_to_influxdb@a73bb6efca1d60de59139c87cc954e58b0b49e45 
Author: B Tasker                            
                            
Date: 2023-05-20T22:54:14.000+01:00 

Message

Check whether the config contains a relevant section before trying to iterate through devices (utilities/tp-link-to-influxdb#5)

+27 -25 (52 lines changed)