mirror of
https://github.com/esphome/esphome.git
synced 2024-11-21 11:37:27 +01:00
Remove explicit cast for IPAddress (#5574)
* Remove explicit cast for IPAddress * Make linter happy
This commit is contained in:
parent
76417103c7
commit
05a95f8ee9
@ -19,9 +19,7 @@ class MQTTBackendLibreTiny final : public MQTTBackend {
|
||||
void set_will(const char *topic, uint8_t qos, bool retain, const char *payload) final {
|
||||
mqtt_client_.setWill(topic, qos, retain, payload);
|
||||
}
|
||||
void set_server(network::IPAddress ip, uint16_t port) final {
|
||||
mqtt_client_.setServer(IPAddress(static_cast<uint32_t>(ip)), port);
|
||||
}
|
||||
void set_server(network::IPAddress ip, uint16_t port) final { mqtt_client_.setServer(IPAddress(ip), port); }
|
||||
void set_server(const char *host, uint16_t port) final { mqtt_client_.setServer(host, port); }
|
||||
#if ASYNC_TCP_SSL_ENABLED
|
||||
void set_secure(bool secure) { mqtt_client.setSecure(secure); }
|
||||
|
@ -26,3 +26,9 @@ sensor:
|
||||
name: ADC
|
||||
pin: GPIO23
|
||||
update_interval: 1s
|
||||
|
||||
mqtt:
|
||||
broker: test.mosquitto.org
|
||||
port: 1883
|
||||
discovery: true
|
||||
discovery_prefix: homeassistant
|
||||
|
Loading…
Reference in New Issue
Block a user