Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using moisture sensors to control programs
#23
for #1: could you possibly rename your plugin files to something like moisture_sensor_info_mqtt.*? I know this could be a real pain. I will look for another solution.

for #2 The jmespath module looks pretty useful. I will consider adding it to the base SIP install even though I prefer to keep things as small and simple as possible.

Edit:
I think the best solution for 1 would be to replace
Code:
short_list = [
x for x in file_list if not "data" in x and not "manifest" in x
]
with
Code:
short_list = []
for line in file_list:
    parts = line.split()
    if (not parts[1] == "data"
       and not parts[1] == "plugins/manifests"
        ):
        short_list.append(line)
Still need to do some testing.
<p><br></p>
Reply


Messages In This Thread
RE: Using moisture sensors to control programs - by dan - 2024 Mar 05, 07:23 PM

Forum Jump:


Users browsing this thread: 7 Guest(s)