Skip to content

Commit

Permalink
Added sense control, again
Browse files Browse the repository at this point in the history
  • Loading branch information
arjenbos committed Oct 30, 2023
1 parent b715514 commit 3edb38f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion custom_components/alpha_innotec/base_coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from homeassistant.core import HomeAssistant

from . import GatewayAPI
from .const import MODULE_TYPE_SENSOR
from .const import MODULE_TYPE_SENSOR, MODULE_TYPE_SENSE_CONTROL
from .controller_api import ControllerAPI
from .structs.Thermostat import Thermostat

Expand Down Expand Up @@ -42,6 +42,9 @@ async def get_thermostats(hass: HomeAssistant, gateway_api: GatewayAPI, controll
if module_details["type"] == MODULE_TYPE_SENSOR:
current_temperature = module_details["currentTemperature"]
battery_percentage = module_details["battery"]
elif module_details["type"] == MODULE_TYPE_SENSE_CONTROL:
current_temperature = module_details["currentTemperature"]
battery_percentage = module_details["battery"]

thermostat = Thermostat(
identifier=room_id,
Expand Down
4 changes: 3 additions & 1 deletion custom_components/alpha_innotec/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@

MODULE_TYPE_FLOOR = "floor"
MODULE_TYPE_SENSOR = "sensor"
MODULE_TYPE_SENSE_CONTROL = "sense_control"

MODULE_TYPES = [
MODULE_TYPE_FLOOR,
MODULE_TYPE_SENSOR
MODULE_TYPE_SENSOR,
MODULE_TYPE_SENSE_CONTROL
]

1 comment on commit 3edb38f

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HA Alpha Innotec Coverage

HA Alpha Innotec
FileStmtsMissCoverMissing
__init__.py21957%19–20, 22, 27, 29, 34, 36–37, 39
api.py44295%48, 51
base_coordinator.py39390%2, 4, 6, 8–11, 13, 16, 18–21, 23, 25–26, 28–31, 33–34, 36–38, 40, 42–47, 49, 61–63, 65–67
binary_sensor.py58580%2, 4–5, 7, 9–12, 17–19, 21, 24, 27, 29, 31, 33, 35, 37–38, 45, 48, 51, 53, 60, 62, 69, 71, 73–74, 76–77, 79–80, 89, 91, 93, 96, 99, 101–104, 106–107, 109, 117–119, 121–122, 124, 126–128, 130–132
climate.py81810%2, 4–5, 7, 9, 13–15, 20–23, 25, 28, 31–32, 34, 36, 38, 40–41, 49, 52, 55, 57, 64–65, 67, 73, 76, 79–81, 85, 87–93, 95–96, 98, 106–107, 109, 111–112, 115, 117–119, 121–122, 124–126, 128–129, 131, 133, 136–137, 139–141, 143, 145–146, 148, 150, 152–154, 156–157, 159, 161–162, 165
config_flow.py371559%24–25, 27–30, 32–35, 57–61
const.py80100% 
controller_api.py765922%17–18, 20–21, 23–26, 28, 30–33, 35, 38, 40, 43, 45, 50, 52–55, 57, 59–60, 62, 64, 71, 73, 80–81, 83, 85, 87, 89, 91–92, 94, 97, 100–101, 103–106, 108, 111, 114, 120, 122–126, 138–140, 142
gateway_api.py624724%17–19, 21–23, 26–27, 29–30, 32–35, 37, 39–42, 44, 47, 49, 52, 54, 59, 61, 63–65, 67, 69–70, 72, 74, 77, 79, 81–82, 84, 87–88, 90, 93, 96–98, 100
sensor.py46460%2, 4–5, 7–10, 15–18, 20, 23, 26–27, 29, 31, 33, 35–38, 40, 47, 50, 53, 55, 62–63, 65, 71, 74, 77–78, 80, 82–86, 88–89, 91, 99–100, 102
structs
   Thermostat.py11918%8–16
TOTAL48336524% 

Tests Skipped Failures Errors Time
3 0 💤 0 ❌ 0 🔥 0.738s ⏱️

Please sign in to comment.