Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
DeveloperSteve authored and DeveloperSteve committed Nov 19, 2023
1 parent 227e227 commit 1a9c6f5
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions custom_components/cumulocity/sensor.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import base64
import requests
from homeassistant.const import CONF_URL, CONF_USERNAME, CONF_PASSWORD, CONF_TENANT
from homeassistant.helpers.entity import Entity

# Define your sensor entities and other configuration as needed.

async def async_setup_entry(hass, entry, async_add_entities):
"""Set up the Cumulocity sensor entities."""
# Retrieve the Cumulocity IoT configuration options from the config entry.
url = entry.options.get(CONF_URL)
username = entry.options.get(CONF_USERNAME)
password = entry.options.get(CONF_PASSWORD)
tenant = entry.options.get(CONF_TENANT)

# Fetch data from Cumulocity and create sensor entities here.
# Use the retrieved credentials (url, username, password, tenant) to authenticate.

# Define your sensor entities and add them using async_add_entities.

0 comments on commit 1a9c6f5

Please sign in to comment.