Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
joBr99 committed Nov 26, 2023
2 parents 900e1ae + 2a43a96 commit b38189d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion nspanel-lovelace-ui/config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# https://developers.home-assistant.io/docs/add-ons/configuration#add-on-config
name: NSPanel Lovelace UI Addon
version: "4.7.43"
version: "4.7.44"
slug: nspanel-lovelace-ui
description: NSPanel Lovelace UI Addon
services:
Expand Down
6 changes: 3 additions & 3 deletions nspanel-lovelace-ui/rootfs/usr/bin/mqtt-manager/ha_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ def calculate_dim_values(sleepTracking, sleepTrackingZones, sleepBrightness, scr
dimmode = sleepBrightness
elif libs.home_assistant.is_existent(sleepBrightness):
involved_entities.append(sleepBrightness)
dimmode = int(libs.home_assistant.get_entity_data(sleepBrightness).get('state', 10))
dimmode = int(float(libs.home_assistant.get_entity_data(sleepBrightness).get('state', 10)))

if screenBrightness:
if isinstance(screenBrightness, int):
dimValueNormal = screenBrightness
elif libs.home_assistant.is_existent(screenBrightness):
involved_entities.append(screenBrightness)
dimValueNormal = int(libs.home_assistant.get_entity_data(screenBrightness).get('state', 100))
dimValueNormal = int(float(libs.home_assistant.get_entity_data(screenBrightness).get('state', 100)))

# force sleep brightness to zero in case sleepTracking is active
if sleepTracking:
Expand Down Expand Up @@ -289,4 +289,4 @@ def on_off(entity_id, value):
call_ha_service(entity_id, service)
case _:
logging.error(
"Control action on_off not implemented for %s", entity_id)
"Control action on_off not implemented for %s", entity_id)

0 comments on commit b38189d

Please sign in to comment.