I’m wanting to show my values by notification differently, and it’s not cooperating with any css I’m throwing at it.
Here’s the config - commented to show how I want it to look (adjusted upon rediscovery that some values are calculated, and I’m not gonna bother with that):
{
module: "MMM-ValuesByNotification", // https://github.com/Tom-Hirschberger/MMM-ValuesByNotification
position: "bottom_right",
config: {
animationSpeed: 0,
updateInterval: 15,
reuseCount: 99,
transformerFunctions: {
degToCompass: (num) => {
val = ((num/22.5)+.5) | 0;
arr = ["N","NNE","NE","ENE","E","ESE", "SE", "SSE","S","SSW","SW","WSW","W","WNW","NW","NNW"];
res = arr[(val % 16)];
return res;
},
toDate: (num) => {
return new Date(num * 1000).toLocaleString('en-US', {
year: 'numeric',
month: '2-digit',
day: '2-digit',
hour: '2-digit',
minute: '2-digit',
second: '2-digit',
hour12: true
});
},
},
groups: [
//groups should be on row next to each other.
// Values next to titles unless indicated.
{
classes: "row",
items: [
{
notification: "Weather",
values: [
{
valueTitle: " ",
valueUnit: "°F",
jsonpath: "data.conditions[0].temp",
valueFormat: "Number(${value}).toFixed(1)",
classes: "xlarge",
},
],
},
],
},
// Insert vertical rule here
{
classes: "row medium",
items: [
{
notification: "Weather",
values: [
{
valueTitle: "Wind:",
valueUnit: "mph",
jsonpath: "data.conditions[0].wind_speed_last",
valueFormat: "Number(${value}).toFixed(1)",
unitSpace: true,
},
// same line as previous
{
valueTitle: " ",
jsonpath: "data.conditions[0].wind_dir_last",
valueTransformers: ["degToCompass"],
},
// Insert <HR> here
{
valueTitle: "Rain:",
valueUnit: "in",
unitSpace: true,
jsonpath: "data.conditions[0].rainfall_daily",
valueFormat: "Number(${value}/100).toFixed(2)",
},
// same line as previous
{
valueTitle: "Yearly Total",
valueUnit: "in",
unitSpace: true,
jsonpath: "data.conditions[0].rainfall_year" ,
valueFormat: "Number(${value}/100).toFixed(2)",
},
],
},
],
},
// Insert Vertical Rule here
{
classes: "row medium",
items: [
{
notification: "Weather",
values: [
{
valueTitle: "Humidity:",
valueUnit: "%",
jsonpath: "data.conditions[0].hum",
valueFormat: "Number(${value}).toFixed(1)",
},
// same line as previous
{
valueTitle: "Feels like:",
valueUnit: "°F",
jsonpath: "data.conditions[0].thw_index",
valueFormat: "Number(${value}).toFixed(1)",
},
// Insert <HR> here
{
valueTitle: "Barometer",
valueUnit: "in Hg",
unitSpace: true,
jsonpath: "data.conditions[2].bar",
valueFormat: "Number(${value}).toFixed(3)",
},
],
},
],
},
// Below others.
{
classes: "bottom small",
items: [
{
notification: "Weather",
values: [
{
valueTitle: "Conditions as of:",
jsonpath: "data.ts",
valueTransformers: ["toDate"],
//classes: "",
}
]
},
],
},
],
},
},
Existing CSS modifications - and needs:
.MMM-ValuesByNotification {
border-radius: 0px;
border-style: none;
color: black;
background-color: white;
}
.MMM-ValuesByNotification .vbn .groupWrapper {
border-radius: 0px;
border-style: none;
color: black;
background-color: white;
}
/* vertical rule
.vertical-rule {
margin-top: 15px;
margin-bottom: 15px;
width: 1px;
background: #e0e4e7;
float: left;
height: 90px;
}
*/