Open stefanschaedeli opened 6 months ago
logs_ug-technik-pm-truenas_logs.txt logs_ug-technik-pm-truenas_run.txt
and my yaml:
`
api: encryption: key: "XXX="
ota: password: "XXX"
wifi: ssid: !secret wifi_ssid password: !secret wifi_password manual_ip: static_ip: 10.15.15.212 gateway: 10.15.15.1 subnet: 255.255.255.0
substitutions: name: "athom-smart-plug" friendly_name: "Smart Plug" room: "" device_description: "athom smart plug" project_name: "Athom Technology.Smart Plug" project_version: "1.0" relay_restore_mode: RESTORE_DEFAULT_OFF sensor_update_interval: 10s
esphome: name: "${name}" friendly_name: "${friendly_name}" name_add_mac_suffix: true project: name: "${project_name}" version: "${project_version}"
esp8266: board: esp8285 restore_from_flash: true
preferences: flash_write_interval: 1min
logger:
web_server: port: 80
dashboard_import: package_import_url: github://athom-tech/athom-configs/athom-smart-plug.yaml
binary_sensor:
platform: status name: "Status" entity_category: diagnostic
platform: gpio pin: number: 3 mode: INPUT_PULLUP inverted: true name: "Power Button" disabled_by_default: true on_multi_click:
sensor:
platform: uptime name: "Uptime Sensor" id: uptime_sensor entity_category: diagnostic internal: True
platform: wifi_signal name: "WiFi Signal" id: wifi_signal_db update_interval: 60s entity_category: diagnostic internal: true
platform: copy source_id: wifi_signal_db name: "WiFi Strength" filters:
platform: hlw8012 sel_pin: number: GPIO12 inverted: True cf_pin: GPIO4 cf1_pin: GPIO5 voltage_divider: 780 current: name: "Current" filters:
power: name: "Power" id: socket_my_power unit_of_measurement: W filters:
platform: total_daily_energy name: "Total Energy" power_id: socket_my_power unit_of_measurement: kWh accuracy_decimals: 3 restore: true filters:
button:
platform: factory_reset name: "Reset" id: Reset entity_category: config
platform: safe_mode name: "Safe Mode" internal: false entity_category: config
switch:
platform: gpio name: "Plug" pin: GPIO14 id: relay restore_mode: ${relay_restore_mode} on_turn_on:
on_turn_off:
light:
text_sensor:
platform: wifi_info ip_address: name: "IP Address" entity_category: diagnostic ssid: name: "Connected SSID" entity_category: diagnostic mac_address: name: "Mac Address" entity_category: diagnostic
platform: template name: 'Device Last Restart' id: device_last_restart icon: mdi:clock entity_category: diagnostic
time:
update_interval: 360min
on_time_sync: then:
- if: condition: lambda: 'return id(device_last_restart).state == "";' then: - text_sensor.template.publish: id: device_last_restart state: !lambda 'return id(sntp_time).now().strftime("%a %d %b %Y - %I:%M:%S %p");'
It looks like the button is shaking. Try increasing the time here.
https://github.com/athom-tech/athom-configs/blob/9b811a338460122f9d9f226bfd5ebd6560f8d846/athom-smart-plug.yaml#L58
same behaviour unfortunately:
Uploading Bildschirmaufnahme 2024-05-02 um 15.29.09.mov…
logs_ug-technik-pm-truenas_logs.txt logs_ug-technik-pm-truenas_run.txt
and my yaml:
`
Enable Home Assistant API
api: encryption: key: "XXX="
ota: password: "XXX"
wifi: ssid: !secret wifi_ssid password: !secret wifi_password manual_ip: static_ip: 10.15.15.212 gateway: 10.15.15.1 subnet: 255.255.255.0
substitutions: name: "athom-smart-plug" friendly_name: "Smart Plug" room: "" device_description: "athom smart plug" project_name: "Athom Technology.Smart Plug" project_version: "1.0" relay_restore_mode: RESTORE_DEFAULT_OFF sensor_update_interval: 10s
esphome: name: "${name}" friendly_name: "${friendly_name}" name_add_mac_suffix: true project: name: "${project_name}" version: "${project_version}"
esp8266: board: esp8285 restore_from_flash: true
preferences: flash_write_interval: 1min
logger:
web_server: port: 80
dashboard_import: package_import_url: github://athom-tech/athom-configs/athom-smart-plug.yaml
binary_sensor:
platform: status name: "Status" entity_category: diagnostic
platform: gpio pin: number: 3 mode: INPUT_PULLUP inverted: true name: "Power Button" disabled_by_default: true on_multi_click:
sensor:
platform: uptime name: "Uptime Sensor" id: uptime_sensor entity_category: diagnostic internal: True
platform: wifi_signal name: "WiFi Signal" id: wifi_signal_db update_interval: 60s entity_category: diagnostic internal: true
Reports the WiFi signal strength in %
platform: copy source_id: wifi_signal_db name: "WiFi Strength" filters:
platform: hlw8012 sel_pin: number: GPIO12 inverted: True cf_pin: GPIO4 cf1_pin: GPIO5 voltage_divider: 780 current: name: "Current" filters:
Normalize for plug load
power: name: "Power" id: socket_my_power unit_of_measurement: W filters:
Normalize for plug load
platform: total_daily_energy name: "Total Energy" power_id: socket_my_power unit_of_measurement: kWh accuracy_decimals: 3 restore: true filters:
button:
platform: factory_reset name: "Reset" id: Reset entity_category: config
platform: safe_mode name: "Safe Mode" internal: false entity_category: config
switch:
platform: gpio name: "Plug" pin: GPIO14 id: relay restore_mode: ${relay_restore_mode} on_turn_on:
on_turn_off:
light:
text_sensor:
platform: wifi_info ip_address: name: "IP Address" entity_category: diagnostic ssid: name: "Connected SSID" entity_category: diagnostic mac_address: name: "Mac Address" entity_category: diagnostic
Creates a sensor showing when the device was last restarted
platform: template name: 'Device Last Restart' id: device_last_restart icon: mdi:clock entity_category: diagnostic
device_class: timestamp
Creates a sensor of the uptime of the device, in formatted days, hours, minutes and seconds
time:
Change sync interval from default 5min to 6 hours
update_interval: 360min
Publish the time the device was last restarted
on_time_sync: then:
Update last restart time, but only once.
`