mirror of
https://github.com/esphome/esphome.git
synced 2025-01-31 10:10:56 +00:00
parent
11c38ca4e8
commit
94bd179256
@ -211,12 +211,14 @@ def upload_program(config, args, host):
|
|||||||
|
|
||||||
|
|
||||||
def show_logs(config, args, port):
|
def show_logs(config, args, port):
|
||||||
|
if 'logger' not in config:
|
||||||
|
raise EsphomeyamlError("Logger is not configured!")
|
||||||
if get_port_type(port) == 'SERIAL':
|
if get_port_type(port) == 'SERIAL':
|
||||||
run_miniterm(config, port)
|
run_miniterm(config, port)
|
||||||
return 0
|
return 0
|
||||||
if get_port_type(port) == 'NETWORK':
|
if get_port_type(port) == 'NETWORK' and 'api' in config:
|
||||||
return run_logs(config, port)
|
return run_logs(config, port)
|
||||||
if get_port_type(port) == 'MQTT':
|
if get_port_type(port) == 'MQTT' and 'mqtt' in config:
|
||||||
return mqtt.show_logs(config, args.topic, args.username, args.password, args.client_id)
|
return mqtt.show_logs(config, args.topic, args.username, args.password, args.client_id)
|
||||||
|
|
||||||
raise ValueError
|
raise ValueError
|
||||||
|
Loading…
x
Reference in New Issue
Block a user