Skip to content

Commit

Permalink
Fix battery level based power automations turning off devices above t…
Browse files Browse the repository at this point in the history
…he threshold

Updated changelog
  • Loading branch information
Raphiiko committed Jul 13, 2024
1 parent fc35b40 commit c96f816
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,23 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.13.3]

### Fixed

- Battery level based power automations turning off devices above the threshold

## [1.13.2]

### Fixed

- The status message not updating when the visibility remained the same
- The status message not setting to an empty value

## [1.13.1]

### Fixed

- Some modals automatically closing right after opening them
- Some modals being rendered incorrectly

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "oyasumi",
"version": "1.13.2",
"version": "1.13.3",
"author": "Raphiiko",
"license": "MIT",
"type": "module",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ export class TurnOffDevicesOnBatteryLevelAutomationService {
case 'Controller':
if (!this.config.turnOffControllers) return;
if (this.config.turnOffControllersOnlyDuringSleepMode && !sleepMode) return;
if (currentLevel > this.config.turnOffControllersAtLevel) return;
if (currentLevel * 100 > this.config.turnOffControllersAtLevel) return;
threshold = this.config.turnOffControllersAtLevel;
break;
case 'GenericTracker':
if (!this.config.turnOffTrackers) return;
if (this.config.turnOffTrackersOnlyDuringSleepMode && !sleepMode) return;
if (currentLevel > this.config.turnOffTrackersAtLevel) return;
if (currentLevel * 100 > this.config.turnOffTrackersAtLevel) return;
threshold = this.config.turnOffTrackersAtLevel;
break;
default:
Expand Down

0 comments on commit c96f816

Please sign in to comment.