mirror of
https://github.com/adrianjagielak/home-assistant-futurehome.git
synced 2025-09-13 15:47:08 +00:00
Fix exposing temperature sensor by correcting invalid units
This commit is contained in:
parent
c26f4ad92f
commit
6dea4e5e77
@ -9,7 +9,7 @@ export function handlePresenceSensor(client: MqttClient, dev: any, svc: any) {
|
||||
uniq_id: uid,
|
||||
dev_cla: "presence",
|
||||
stat_t: `${base}/state`,
|
||||
unit_of_meas: "℃",
|
||||
unit_of_meas: "°C",
|
||||
device: { identifiers: [dev.id.toString()], name: dev.name, model: dev.model }
|
||||
}), { retain: true });
|
||||
|
||||
|
@ -9,7 +9,7 @@ export function handleTempSensor(client: MqttClient, dev: any, svc: any) {
|
||||
uniq_id: uid,
|
||||
dev_cla: "temperature",
|
||||
stat_t: `${base}/state`,
|
||||
unit_of_meas: "℃",
|
||||
unit_of_meas: "°C",
|
||||
device: { identifiers: [dev.id.toString()], name: dev.name, model: dev.model }
|
||||
}), { retain: true });
|
||||
|
||||
|
@ -5,9 +5,9 @@ import { HaComponent } from "../ha/publish_device";
|
||||
export function sensor_dew__components(vinculumDeviceData: VinculumPd7Device, svc: InclusionReportService): { [key: string]: HaComponent } {
|
||||
if (!svc.address) { return {}; }
|
||||
|
||||
let unit = svc.props?.sup_units?.[0] ?? "℃";
|
||||
if (unit === 'C') unit = '℃';
|
||||
if (unit === 'F') unit = '℉';
|
||||
let unit = svc.props?.sup_units?.[0] ?? "°C";
|
||||
if (unit === 'C') unit = '°C';
|
||||
if (unit === 'F') unit = '°F';
|
||||
|
||||
return {
|
||||
[svc.address]: {
|
||||
|
@ -5,9 +5,9 @@ import { HaComponent } from "../ha/publish_device";
|
||||
export function sensor_temp__components(vinculumDeviceData: VinculumPd7Device, svc: InclusionReportService): { [key: string]: HaComponent } {
|
||||
if (!svc.address) { return {}; }
|
||||
|
||||
let unit = svc.props?.sup_units?.[0] ?? "℃";
|
||||
if (unit === 'C') unit = '℃';
|
||||
if (unit === 'F') unit = '℉';
|
||||
let unit = svc.props?.sup_units?.[0] ?? "°C";
|
||||
if (unit === 'C') unit = '°C';
|
||||
if (unit === 'F') unit = '°F';
|
||||
|
||||
return {
|
||||
[svc.address]: {
|
||||
|
@ -5,9 +5,9 @@ import { HaComponent } from "../ha/publish_device";
|
||||
export function sensor_wattemp__components(vinculumDeviceData: VinculumPd7Device, svc: InclusionReportService): { [key: string]: HaComponent } {
|
||||
if (!svc.address) { return {}; }
|
||||
|
||||
let unit = svc.props?.sup_units?.[0] ?? "℃";
|
||||
if (unit === 'C') unit = '℃';
|
||||
if (unit === 'F') unit = '℉';
|
||||
let unit = svc.props?.sup_units?.[0] ?? "°C";
|
||||
if (unit === 'C') unit = '°C';
|
||||
if (unit === 'F') unit = '°F';
|
||||
|
||||
return {
|
||||
[svc.address]: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user