@123 Looks like the mqtt string from Vera doesnt say oregon/Wind/gustspeed lke when we tested last time.
The mqtt message looks like this now.
Meddelande 1962 mottaget på Vera/Events/Vindsensor 220403 vid 22:44 :
{
“DeviceId”: 2880,
“DeviceName”: “Vindsensor 220403”,
“DeviceType”: “urn:schemas-micasaverde-com:device:WindSensor:1”,
“Direction”: 180,
“OldDirection”: 157,
“RoomId”: 14,
“RoomName”: “Utomhus”,
“ServiceId”: “urn:upnp-org:serviceId:WindSensor1”,
“Time”: 1682887441,
“Variable”: “Direction”
}
QoS: 0 - Retain: false
Meddelande 1961 mottaget på Vera/Events/Vindsensor 220403 vid 22:43 :
{
“AvgSpeed”: 0,
“DeviceId”: 2880,
“DeviceName”: “Vindsensor 220403”,
“DeviceType”: “urn:schemas-micasaverde-com:device:WindSensor:1”,
“OldAvgSpeed”: 0.27777777777778,
“RoomId”: 14,
“RoomName”: “Utomhus”,
“ServiceId”: “urn:upnp-org:serviceId:WindSensor1”,
“Time”: 1682887427,
“Variable”: “AvgSpeed”
}
QoS: 0 - Retain: false
Meddelande 1960 mottaget på Vera/Events/Vindsensor 220403 vid 22:43 :
{
“DeviceId”: 2880,
“DeviceName”: “Vindsensor 220403”,
“DeviceType”: “urn:schemas-micasaverde-com:device:WindSensor:1”,
“Direction”: 157,
“OldDirection”: 180,
“RoomId”: 14,
“RoomName”: “Utomhus”,
“ServiceId”: “urn:upnp-org:serviceId:WindSensor1”,
“Time”: 1682887427,
“Variable”: “Direction”
}
QoS: 0 - Retain: false
Meddelande 1959 mottaget på Will_Topic/ vid 22:43 :
testament_msg
QoS: 0 - Retain: false
Meddelande 1958 mottaget på Will_Topic/ vid 22:43 :
testament_msg
QoS: 0 - Retain: false
Meddelande 1957 mottaget på Vera/Events/Vindsensor 220403 vid 22:43 :
{
“AvgSpeed”: 1,
“DeviceId”: 2880,
“DeviceName”: “Vindsensor 220403”,
“DeviceType”: “urn:schemas-micasaverde-com:device:WindSensor:1”,
“OldAvgSpeed”: 0.83333333333333,
“RoomId”: 14,
“RoomName”: “Utomhus”,
“ServiceId”: “urn:upnp-org:serviceId:WindSensor1”,
“Time”: 1682887385,
“Variable”: “AvgSpeed”
}
QoS: 0 - Retain: false
Meddelande 1956 mottaget på Vera/Events/Vindsensor 220403 vid 22:43 :
{
“AvgSpeed”: 0.27777777777778,
“DeviceId”: 2880,
“DeviceName”: “Vindsensor 220403”,
“DeviceType”: “urn:schemas-micasaverde-com:device:WindSensor:1”,
“OldAvgSpeed”: 1,
“RoomId”: 14,
My configuration.yaml looks like this:
mqtt:
sensor:
- name: 'Average_Speed'
unique_id: 'Average_Speed2'
state_topic: 'oregon/wind/AvgSpeed'
unit_of_measurement: 'm/s'
value_template: '{{ (value_json.AvgSpeed / 3.6) | round(2) }}'
- name: 'Gust_Speed'
unique_id: 'Gust_Speed'
state_topic: 'oregon/wind/GustSpeed'
unit_of_measurement: 'm/s'
value_template: '{{ (value_json.GustSpeed / 3.6) | round(2) }}'
- name: 'Direction2'
unique_id: 'Direction2'
state_topic: 'oregon/wind/Direction'
value_template: >
{% set directions =
{ 12: 'Norr',
35: 'Norr Norr Öst',
57: 'Norr Öst',
80: 'Öst Norr Öst',
102: 'Öst',
125: 'Öst Syd Öst',
147: 'Syd Öst',
170: 'Syd Syd Öst',
192: 'Syd',
215: 'Syd Syd Väst',
237: 'Syd Väst',
260: 'Väst Syd Väst',
282: 'Väst',
305: 'Väst Norr Väst',
327: 'Norr Väst',
349: 'Norr Norr Väst',
360: 'Norr' } %}
{{ directions.get(directions.keys() | select('>', value_json.Direction | int(0)) | first, 'Unknown') }}
- name: 'Current_Rain'
unique_id: 'Current_Rain'
state_topic: 'oregon/rain/CurrentRain'
unit_of_measurement: 'mm/h'
value_template: '{{ value_json.CurrentRain }}'
- name: 'Total_Rain'
unique_id: 'Total_Rain'
state_topic: 'oregon/rain/CurrentTRain'
unit_of_measurement: 'mm'
value_template: '{{ value_json.CurrentTRain }}'
Is that wrong??