esphome / esphome/feature-requests

Publish State of Power Supply Component / Make State of Power Supply Component accessible for Automation

Open
#1,065 3 comments 1 reaction 0 assignees View on GitHub
component: power_supply
Dominant language
No language data
Stars
450
Forks
29
PR merge metrics
No merged PRs in 30d

Description

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

The state of the Power Supply Component (ON/OFF) is not published via Native API nor thru MQTT.

I also couldn´t manage to fetch the state for use in ESPhome internal automation.

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

In my use case i have a feedback input of the External PSU to check if the PSU is delivering Power. Together with the read PSU Component state i want to check for Errors (AC Brownout or Faulty PSU). Another use case is that the state of the Power Supply Component gives a convinient trigger if for example any of the light outputs is in use.

I tried several attempts to read the state but it seems that the used class has no handle to interact with:

"on_state/press/release" will give a warning from the Editor that this is not allowed. Lambda templates will let the Compiler exit with errors. Assigning a generic switch to the same GPIO as the Power Supply Component will give manual control of the PSU but the Generic Switch will not be updated if the PSU Component switches the GPIO.

**Additional context**

It would be nice if the Power Supply Component would pubblish its state through Native API and MQTT same as a binary sensor or even better if there would be a handle to request the state of it for ESPhome internal automation.

Happy new Year!

greetz

Roque

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.