Skip to content

Commit

Permalink
force name to null
Browse files Browse the repository at this point in the history
  • Loading branch information
santam85 committed Aug 10, 2023
1 parent 23cebcf commit 0364da6
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions warema-bridge/srv/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ function registerDevice(element) {
{topic: 'warema/bridge/state'},
{topic: availability_topic}
],
unique_id: element.snr
unique_id: element.snr,
name: null
}

var base_device = {
Expand All @@ -58,6 +59,7 @@ function registerDevice(element) {
state_topic: 'warema/' + element.snr + '/illuminance/state',
device_class: 'illuminance',
unique_id: element.snr + '_illuminance',
object_id: element.snr + '_illuminance',
unit_of_measurement: 'lx',
};
client.publish('homeassistant/sensor/' + element.snr + '/illuminance/config', JSON.stringify(illuminance_payload), {retain: true})
Expand All @@ -68,6 +70,7 @@ function registerDevice(element) {
state_topic: 'warema/' + element.snr + '/temperature/state',
device_class: 'temperature',
unique_id: element.snr + '_temperature',
object_id: element.snr + '_temperature',
unit_of_measurement: '°C',
}
client.publish('homeassistant/sensor/' + element.snr + '/temperature/config', JSON.stringify(temperature_payload), {retain: true})
Expand All @@ -77,6 +80,7 @@ function registerDevice(element) {
state_topic: 'warema/' + element.snr + '/wind/state',
device_class: 'wind_speed',
unique_id: element.snr + '_wind',
object_id: element.snr + '_wind',
unit_of_measurement: 'm/s',
}
client.publish('homeassistant/sensor/' + element.snr + '/wind/config', JSON.stringify(wind_payload), {retain: true})
Expand All @@ -86,7 +90,8 @@ function registerDevice(element) {
...payload,
state_topic: 'warema/' + element.snr + '/rain/state',
device_class: 'moisture',
unique_id: element.snr + '_rain'
unique_id: element.snr + '_rain',
object_id: element.snr + '_rain',
}
client.publish('homeassistant/binary_sensor/' + element.snr + '/rain/config', JSON.stringify(rain_payload), {retain: true})

Expand Down

0 comments on commit 0364da6

Please sign in to comment.