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

Option for setting mqtt not to retain state... #140

Open
mattlward opened this issue Feb 18, 2024 · 2 comments
Open

Option for setting mqtt not to retain state... #140

mattlward opened this issue Feb 18, 2024 · 2 comments
Assignees
Labels
Solution Provided Community provided a solution as comments to issue

Comments

@mattlward
Copy link

mattlward commented Feb 18, 2024

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
I would like to use your card in a conditional card, some of my pi's are not on all the time and I would like to be able to hide them from the dashboard when they are not up. I have set the conditional to be the following...

condition: state entity: sensor.rpi_ts_pi_home_rpi_monitor_ts_pi state_not: unavailable

Sorry, can't get this to format correctly...

But it never becomes unavailable as the data is retained from the last operational state.
Describe the solution you'd like
A clear and concise description of what you want to happen.

I would like to see the above sensor become unavailable after the duration of the polling interval is exceeded.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

I could maybe set up a ping sensor to decide when the unit is down.

Additional context
Add any other context or screenshots about the feature request here.

@bsimmo
Copy link

bsimmo commented Feb 18, 2024 via email

@ironsheep ironsheep added the Solution Provided Community provided a solution as comments to issue label Apr 22, 2024
@ironsheep
Copy link
Owner

@bsimmo is correct. The daemon publishes .../status endpoints that contain the live up/down state [online|offline]. You should be able to condition your cards to hide if the status is not online.

The two endpoints look like this:
{base_topic}/sensor/{sensor_name}/status
{base_topic}/command/{sensor_name}/status

@ironsheep ironsheep self-assigned this Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Solution Provided Community provided a solution as comments to issue
Projects
None yet
Development

No branches or pull requests

3 participants