Hi,
just bought a pack of four nous a1t plugs.
Flashing esphome worked like a charm as the plug already had tasmota installed.
Anyways, i noticed that the plugs get pretty warm, you can still hold them in your hand but doesn’t feel right…
anyidea what i configured wrong?
i copied a couple of yaml files from the net so here is what i came up with:
esphome:
name: ${name}
friendly_name: ${friendly_name}
comment: ${comment}
# name_add_mac_suffix: true
# project:
# name: "NOUS.Smart-Wifi-Socket"
# version: "A1T"
esp8266:
board: esp8285
restore_from_flash: true
wifi:
ssid: ${wifi_ssid}
password: ${wifi_password}
domain: ${wifi_domain}
ap:
ssid: "${name}-Fallback-AP"
password: ${ap_point_password}
logger:
level: ${log_level}
api:
encryption:
key: ${api_key}
ota:
password: ${ota_password}
captive_portal:
time:
- platform: homeassistant
id: homeassistant_time
# Enable Web server
web_server:
port: 80
light:
- platform: status_led
id: led
pin:
number: GPIO13
inverted: true
binary_sensor:
- platform: status
name: "${friendly_name} - Status"
# toggle relay on/off
- platform: gpio
pin:
number: GPIO00
mode: INPUT_PULLUP
id: "button_state"
on_press:
- switch.toggle: "button_switch"
switch:
- platform: template
name: "${friendly_name} - Switch"
icon: mdi:power
optimistic: true
id: "button_switch"
lambda: |-
if (id(relay).state) {
return true;
} else {
return false;
}
turn_on_action:
- switch.turn_on: relay
- light.turn_on: led
turn_off_action:
- switch.turn_off: relay
- light.turn_off: led
restore_mode: ALWAYS_ON
- platform: gpio
pin: GPIO14
id: relay
restore_mode: ALWAYS_ON
sensor:
- platform: wifi_signal
name: "${friendly_name} - Wifi Signal"
update_interval: 60s
icon: mdi:wifi
- platform: uptime
name: "${friendly_name} - Uptime"
update_interval: 60s
icon: mdi:clock-outline
- platform: total_daily_energy
name: "${friendly_name} - Electric Consumption [kWh]"
power_id: "nous_a1t_watt"
filters:
# Multiplication factor from W to kW is 0.001
- multiply: 0.001
unit_of_measurement: kWh
icon: mdi:calendar-clock
- platform: adc
pin: VCC
name: "${friendly_name} - VCC Volt"
icon: mdi:flash-outline
- platform: hlw8012
sel_pin:
number: GPIO12
inverted: True
cf_pin: GPIO04
cf1_pin: GPIO05
change_mode_every: 4
current_resistor: ${current_res}
voltage_divider: ${voltage_div}
update_interval: 3s
current:
name: "${fGriendly_name} - Ampere"
unit_of_measurement: A
accuracy_decimals: 3
icon: mdi:current-ac
voltage:
name: "${friendly_name} - Voltage"
unit_of_measurement: V
accuracy_decimals: 1
icon: mdi:flash-outline
power:
name: "${friendly_name} - Power"
id: "nous_a1t_watt"
unit_of_measurement: W
icon: mdi:gauge
energy:
name: "${friendly_name} - Energy"
text_sensor:
- platform: wifi_info
ip_address:
name: "${friendly_name} - IP Address"
ssid:
name: "${friendly_name} - WiFi SSID"
bssid:
name: "${friendly_name} - WiFi BSSID"
mac_address:
name: "${friendly_name} - Wifi MacAddress"
- platform: version
name: "${friendly_name} - ESPHome Version"
placeholders will be filled from outside