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 an on_error icon selection #190

Closed
ecoen66 opened this issue Feb 17, 2023 · 1 comment
Closed

Add an on_error icon selection #190

ecoen66 opened this issue Feb 17, 2023 · 1 comment

Comments

@ecoen66
Copy link

ecoen66 commented Feb 17, 2023

I would like to propose that the on_error setting for a sensor should include an icon selection. I currently use multiscrape to create multiple sensors from my Cisco Deskpro video phone, one of which is call status. If the Deskpro is on a call, I can grab the status using select: "Status > Call > Status". However, if it is not on a call then there is no "Status > Call" section in the XML result.

In this case I use on_error to set the default state as "idle". Unfortunately, I cannot change the icon if the result was the "on_error" state.

Here is a snippet of my current config:

multiscrape:

  • name: Deskpro scraper
    resource: "https://192.168.1.23/status.xml"
    authentication: basic
    verify_ssl: false
    username: !secret deskpro_username
    password: !secret deskpro_password
    sensor:
    • unique_id: deskpro_call
      name: Deskpro Call Status
      select: "Status > Call > Status"
      on_error:
      value: default
      default: idle
      icon: >-
      {% if value == 'Connected' %}
      mdi:phone-in-talk
      {% else %}
      mdi:phone-hangup
      {% endif %}
@danieldotnl
Copy link
Owner

danieldotnl commented May 7, 2023

Now (finally...) supported in v6.7.0!

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