Hi,
I am just starting to jump into dashticz.
About power consumption button, in standard Domoticz UI you can see 2 information in 1 button: current power consumption and total energy consumed for the day:
In dashticz, am I obliged to have 2 buttons or is there a way to also put the 2 information into one?
2 states in 1 button
Moderators: leecollings, htilburgs, robgeerts
-
- Posts: 2291
- Joined: Monday 29 August 2016 22:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: 2 states in 1 button
Yes, you can combine it. Assuming your device is a P1 smart meter, you can try the following block definition:darrepac wrote: ↑Sunday 31 October 2021 21:57 Hi,
I am just starting to jump into dashticz.
About power consumption button, in standard Domoticz UI you can see 2 information in 1 button: current power consumption and total energy consumed for the day:
2021-10-31 21_56_00-Domoticz.png
In dashticz, am I obliged to have 2 buttons or is there a way to also put the 2 information into one?
2021-10-31 21_55_38-magicmirrorpi - TightVNC Viewer.png
Code: Select all
blocks['customblock'] = {
idx: '43_1',
title:"Actual: <Usage>",
value: "Today: <NettCounterToday> kWh",
format:true,
decimals: 1
}
For as well the title field as the value field of a Domoticz block you can indicate to fill in the value of a Domoticz device parameter by using the '<' and '>' symbol.
For a smart meter device you can use the following device parameters:
Usage (=Actual power entering your house)
UsageDeliv (=Actual power leaving your house)
NettUsage (=Usage - UsageDeliv)
CounterToday (=Energy entered your house today)
CounterDelivToday (=Energy left your house today)
NettCounterToday (=CounterToday - CounterDelivToday)
Counter (=Total counter of energy that entered your house)
CounterDeliv (=Total counter of energy that left your house)
NettCounter (=Counter - CounterDeliv)
All parameter names are case sensitive.
For more fancy computations you can create your custom getStatus function in custom.js
See: https://dashticz.readthedocs.io/en/mast ... -idx-block
or: create a dial. See:https://dashticz.readthedocs.io/en/mast ... mart-meter
-
- Posts: 133
- Joined: Tuesday 04 February 2014 21:31
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Isère, France
- Contact:
Re: 2 states in 1 button
Wow sounds interestings! Many thanks!
-
- Posts: 133
- Joined: Tuesday 04 February 2014 21:31
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Isère, France
- Contact:
Re: 2 states in 1 button
Note: putting values in title is a nice hack but...you do not have any more the original title in your button. But a nice hack still...
For what concern Dial, I have some issues that I will put in the Dial thread.
For what concern Dial, I have some issues that I will put in the Dial thread.
-
- Posts: 2291
- Joined: Monday 29 August 2016 22:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: 2 states in 1 button
You can put any text in the title, including the Domoticz device Name fielddarrepac wrote:Note: putting values in title is a nice hack but...you do not have any more the original title in your button. But a nice hack still...
For what concern Dial, I have some issues that I will put in the Dial thread.
Verstuurd vanaf mijn AC2003 met Tapatalk
Who is online
Users browsing this forum: No registered users and 1 guest