Compare commits

..

2 Commits

Author SHA1 Message Date
0e4f5dfa9e Version 1.2.1 2025-05-17 23:22:11 +02:00
2e89501613 Removed misspelling of the word 'address' 2025-05-17 23:21:31 +02:00

View File

@ -24,7 +24,7 @@ import threading # for running the requests simultaneously
import ipaddress # to validate IP addresses import ipaddress # to validate IP addresses
from fqdn import FQDN # validate FQDNs from fqdn import FQDN # validate FQDNs
version = "v1.2.0" version = "v1.2.1"
# some helpers / utils # some helpers / utils
@ -104,7 +104,7 @@ class TasmotonovRunner:
self.logger.log(f'Validated addresses: distilled the following data. Devices added: {self.tasmota_addresses}') self.logger.log(f'Validated addresses: distilled the following data. Devices added: {self.tasmota_addresses}')
def parse_addresses(self): def parse_addresses(self):
# convert the given adresses to a list # convert the given addresses to a list
tasmota_addresses_raw = [] tasmota_addresses_raw = []
if self.source == 'file': if self.source == 'file':
try: try:
@ -224,8 +224,8 @@ if __name__ == '__main__':
description='A very simple script which allows you to turn on/off multiple tasmota devices specified.', description='A very simple script which allows you to turn on/off multiple tasmota devices specified.',
epilog='Info: if you choose a file as source, this files needs to contain the addresses of the tasmota devices either comma-separated, semicolon-separated, or newline-separated (each entry can have a comment starting with a # (hashtag)!\n\n© Benjamin Burkhardt, 2025') epilog='Info: if you choose a file as source, this files needs to contain the addresses of the tasmota devices either comma-separated, semicolon-separated, or newline-separated (each entry can have a comment starting with a # (hashtag)!\n\n© Benjamin Burkhardt, 2025')
parser.add_argument('source', help='Select either to read the adresses (of the devices) from a "file" or from "inline"', choices=['file', 'inline']) parser.add_argument('source', help='Select either to read the addresses (of the devices) from a "file" or from "inline"', choices=['file', 'inline'])
parser.add_argument('data', help='Either the path to the file, or a comma-, semicolon- or newline-separated list of tasmota adresses.') parser.add_argument('data', help='Either the path to the file, or a comma-, semicolon- or newline-separated list of tasmota addresses.')
parser.add_argument('action', help='Select to turn all tasmota devices "on" or "off" or "toggle" (case insensitive)', choices=['on', 'off', 'toggle']) parser.add_argument('action', help='Select to turn all tasmota devices "on" or "off" or "toggle" (case insensitive)', choices=['on', 'off', 'toggle'])
parser.add_argument('-v', '--verbose', help='Turn on verbose file output', action='store_true') parser.add_argument('-v', '--verbose', help='Turn on verbose file output', action='store_true')
parser.add_argument('--version', action='version', version=f'Tasmotonov.py {version}') parser.add_argument('--version', action='version', version=f'Tasmotonov.py {version}')