diff --git a/lib/constants.js b/lib/constants.js index 2348869..b437ea9 100644 --- a/lib/constants.js +++ b/lib/constants.js @@ -116,6 +116,72 @@ const DATAFIELDS = [ listener_conversion: null, scheduler_conversion: 'timestamp_convert(x)' }, + { + id: 'eventrain', + channels: [{ + channel: 'weather.current', + name: 'Rainrate (Daily)' + },{ + channel: 'weather.maxvalues.absolut', + name: 'Max. Rainrate (Daily) (absolut)' + },{ + channel: 'weather.maxvalues.daily', + name: 'Max. Rainrate (Daily) (daily)' + }], + type: 'number', + unit: 'mm', + role: 'value', + min: 0, + max: 1500, + wunderground: '^eventrainin', + ecowitt: '^eventrainin', + scheduler: 'eventrain', + listener_conversion: mm_to_inch, + scheduler_conversion: 'x / 10', + unit_config: 'unit_rain', + units: [{ + display_name: 'in', + display_conversion: inch_to_mm, + main_unit_conversion: mm_to_inch + }, { + display_name: 'mm', + display_conversion: null + } + ] + }, + { + id: 'hourlyrain', + channels: [{ + channel: 'weather.current', + name: 'Rainrate (Daily)' + },{ + channel: 'weather.maxvalues.absolut', + name: 'Max. Rainrate (Daily) (absolut)' + },{ + channel: 'weather.maxvalues.daily', + name: 'Max. Rainrate (Daily) (daily)' + }], + type: 'number', + unit: 'mm', + role: 'value', + min: 0, + max: 1500, + wunderground: '^hourlyrainin', + ecowitt: '^hourlyrainin', + scheduler: 'hourlyrain', + listener_conversion: mm_to_inch, + scheduler_conversion: 'x / 10', + unit_config: 'unit_rain', + units: [{ + display_name: 'in', + display_conversion: inch_to_mm, + main_unit_conversion: mm_to_inch + }, { + display_name: 'mm', + display_conversion: null + } + ] + }, { id: 'dailyrain', channels: [{ @@ -1102,6 +1168,7 @@ const DATAFIELDS = [ unit: 'mm', role: 'value', min: 0, + max: 2000, wunderground: '^yearlyrainin', ecowitt: '^yearlyrainin', scheduler: 'yearlyrain', @@ -1227,6 +1294,23 @@ const DATAFIELDS = [ listener_conversion: null, scheduler_conversion: null }, + { + id: 'wh65batt', + channels: [{ + channel: 'weather.info', + name: 'WH65 Battery Voltage' + }], + type: 'number', + unit: 'V', + role: 'value.voltage', + min: 0, + max: 24, + wunderground: '^wh65batt([0-9])*', + ecowitt: '^wh65batt([0-9])*', + scheduler: null, + listener_conversion: null, + scheduler_conversion: null + }, { id: 'wh57batt', channels: [{