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

Adding new Sensors / entities - How To #30

Open
demlak opened this issue Jun 11, 2024 · 0 comments
Open

Adding new Sensors / entities - How To #30

demlak opened this issue Jun 11, 2024 · 0 comments

Comments

@demlak
Copy link

demlak commented Jun 11, 2024

Since this issue was going in a complete different direction, i start a new one here:

I want to add new Sensors/Entities to the integration. for example ubus call dsl metrics

For sure i have to add this to the ACL File.. like this and restart rpcd.

{
  "hass": {
    "description": "Home Assistant OpenWrt integration permissions",
    "read": {
      "ubus": {
        "network.wireless": ["status"],
        "network.device": ["status"],
        "iwinfo": ["info", "assoclist"],
        "hostapd.*": ["get_clients", "wps_status"],
        "system": ["board"],
        "dsl": ["metrics"]
      },
    },
    "write": {
      "ubus": {
        "system": ["reboot"],
        "hostapd.*": ["wps_start", "wps_cancel"],
        "file": ["exec"]
      },
      "file": {
        "/usr/bin/uptime": ["exec"]
      }
    }
  }
}

but since i did not find anything new to the integrations-tab in hassio.. i was trying to understand the code of this addon.. i am not a coder =)
So.. do i understand it correctly, that adding new sensors/entities - for example as an ubus-call - there is no automatism to integrate it?
Are all Sensors hard-coded? Do i need to clone the repo and change code for myself to add?

If i am wrong.. what is the correct way to add new sensors/entities?

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

1 participant