Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a means of restarting a ESPHome device from its dashboard entry, and for Wi-Fi devices display the RSSI #2981

Open
vumaddibly opened this issue Dec 7, 2024 · 6 comments

Comments

@vumaddibly
Copy link

Describe the problem you have/What new integration you would like

I would like to see a restart button or command added to each ESPHome dashboard entry, and for Wi-Fi-connected devices, I would also like to see the RSSI displayed.

Please describe your use case for this integration and alternatives you've tried:

When working on the household electrics I often find I have to turn off and reboot an AP. Having a mesh Wi-Fi system, my ESPHome devices will usually connect to one of the remaining nodes but with an inferior signal. When the AP is restored the devices that have switched AP will not automatically reconnect to the best AP as FR #731 is still pending. This request would provide a simple workaround and would avoid every user having to expose a per-device restart button, create multiple RSSI sensors and build a new dashboard that mirrors the dashboard provided by the ESPHome Add-on.

Additional context

@vumaddibly vumaddibly changed the title Add a restart button/command to the ESPHome dashboard/device entries, and for Wi-Fi devices display the RSSI Add a means of restarting a ESPHome device from its dashboard entry, and for Wi-Fi devices display the RSSI Dec 7, 2024
@randybb
Copy link

randybb commented Dec 7, 2024

ESPHome Dashboard is not actively contacting devices unless you click on the log or install button. For such avtions/data you have HA or anything else connected via mqtt.
Even you would implement it, it would be probably rejected.

@vumaddibly
Copy link
Author

@randybb, thanks for the reply. Would it still be possible for a restart button/command to be added to the ESPHome dashboard? If an RSSI sensor existed in a device's configuration could that be displayed within its dashboard entry?

sensor:
  # WiFi Signal Sensor
  - platform: wifi_signal
    name: "RSSI"
    update_interval: 60s

@randybb
Copy link

randybb commented Dec 7, 2024

Dashboard is not getting these data from HA and it will be not actively using API for that, so don't think so anybody would ever do it. The idea is to have the UI cleanest as possible, if you need something extra, you have plenty of other options how to achieve it.
In HA it is super simple, there is no need to duplicate the same thing...
image

@vumaddibly
Copy link
Author

That looks very neat indeed! Would you be happy to share the YAML?

@randybb
Copy link

randybb commented Dec 7, 2024

Unfortunatelly, I made it long time ago and it is not super optimized, do every line is defined for each device - quite annoying. It is using multiple-entity-row

show_header_toggle: false
title: MCU Status
type: entities
entities:
  - entities:
      - entity: sensor.basement_uptime
        name: false
      - entity: sensor.basement_wifi_signal
        name: false
      - entity: button.basement_restart
        icon: mdi:restart
        name: false
    entity: binary_sensor.basement_status
    icon: mdi:devices
    name: Basement
    secondary_info:
      entity: sensor.basement_version
      name: false
    type: custom:multiple-entity-row
  - entities:
      - entity: sensor.basement_2_uptime
        name: false
      - entity: sensor.basement_2_wifi_signal
        name: false
      - entity: button.basement_2_restart
        icon: mdi:restart
        name: false
    entity: binary_sensor.basement_2_status
    icon: mdi:devices
    name: Basement 2
    secondary_info:
      entity: sensor.basement_2_version
      name: false
    type: custom:multiple-entity-row

For tracking current SDK version (yea, IDF 5.1.5 is in the current beta :) ) I am using a different card with https://github.com/custom-cards/flex-table-card - this one is fully dynamic. Not sure about buttons, but it might be possible.

image

type: custom:flex-table-card
title: SDK Version
entities:
  include:
    - sensor.*_device_info
columns:
  - name: Name
    data: friendly_name
  - name: Value
    data: state
    modify: /ESP-IDF[^\|]*|SDK[^\|]*\|Core[^\|]*/.exec(x)
sort_by: friendly_name+
grid_options:
  columns: full

@vumaddibly
Copy link
Author

Thanks, it's very much appreciated. It's always good to have a head start 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants