-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #189 from Drenso/add-climate-sensors
Add climate sensors
- Loading branch information
Showing
21 changed files
with
552 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/** capabilities that map one to one to a Homey capability */ | ||
export const CLIMATE_SENSOR_CAPABILITIES = { | ||
read_write: ['switch'], | ||
read_only: ['temper_alarm'], | ||
read_only_scaled: ['va_temperature', 'va_humidity', 'bright_value'], | ||
setting: [], | ||
} as const; | ||
|
||
export const CLIMATE_CAPABILITY_MAPPING = { | ||
switch: 'onoff', | ||
va_temperature: 'measure_temperature', | ||
va_humidity: 'measure_humidity', | ||
bright_value: 'measure_luminance', | ||
battery_value: 'measure_battery', | ||
va_battery: 'measure_battery', | ||
} as const; | ||
|
||
export const CLIMATE_SENSOR_SETTING_LABELS = { | ||
va_temperature_scaling: 'Measured Temperature Scale', | ||
va_humidity_scaling: 'Measured Humidity Scale', | ||
bright_value_scaling: 'Measured Brightness Scale', | ||
} as const; | ||
|
||
export type HomeyClimateSensorSettings = { | ||
va_temperature_scaling: '0' | '1' | '2' | '3'; | ||
va_humidity_scaling: '0' | '1' | '2' | '3'; | ||
bright_value_scaling: '0' | '1' | '2' | '3'; | ||
}; | ||
|
||
export type TuyaClimateSensorSettings = Record<string, never>; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.