Commit 2a28b33c authored by Thomas Eimers's avatar Thomas Eimers

claenup

parent 463bb05e
Pipeline #95502427 failed with stages
in 10 minutes and 7 seconds
......@@ -3,11 +3,9 @@ parameters:
- Zend\Stdlib\Parameters
ignoreErrors:
- '#Method Mosquitto\\Client::loop\(\) invoked with 1 parameter, 2 required.#'
- '#Class Mosquitto\\Client constructor invoked with 0 parameters, 2 required.#'
- '#Method Mosquitto\\Client::connect\(\) invoked with 2 parameters, 4 required.#'
- '#Method Mosquitto\\Client::loop\(\) invoked with 0 parameters, 2 required.#'
- '#Method Mosquitto\\Client::publish\(\) invoked with 2 parameters, 4 required.#'
- '#Access to an undefined property Mosquitto\\Message::\$topic.#'
- '#Access to an undefined property Mosquitto\\Message::\$payload.#'
- '#Call to an undefined method object::loop\(\).#'
......
......@@ -37,17 +37,6 @@ class RrdService
dump($result);
}
protected function filterSensorValues(State ...$sensorValues)
{
foreach ($sensorValues as $key => $sensorValue) {
/** @var StoreRrdInterface $sensorValue */
if (!is_a($sensorValue, StoreRrdInterface::class)) {
unset($sensorValues[$key]);
}
}
return $sensorValues;
}
/**
* @param DateTime $date
* @param State ...$sensorValues
......@@ -56,7 +45,7 @@ class RrdService
*/
public function getImageCommand(DateTimeInterface $date, State ...$sensorValues): string
{
$sensorValues = $this->filterSensorValues(...array_values($sensorValues));
$sensorValues = $this->filterSensors(...array_values($sensorValues));
if (empty($sensorValues)) {
throw new HeatingException('No Sensorvalues to show');
......@@ -73,7 +62,7 @@ class RrdService
*/
protected function getLines(State ...$sensorValues): string
{
$sensorValues = $this->filterSensorValues(...array_values($sensorValues));
$sensorValues = $this->filterSensors(...array_values($sensorValues));
$cmd = ' ';
foreach ($sensorValues as $sensor) {
......@@ -114,6 +103,10 @@ class RrdService
echo "Skipped sensor " . $sensorValue->getName();
unset($sensorValues[$key]);
}
/** @var StoreRrdInterface $sensorValue */
if (!is_a($sensorValue, StoreRrdInterface::class)) {
unset($sensorValues[$key]);
}
}
return $sensorValues;
}
......
......@@ -146,10 +146,35 @@ device_tracker.t_eimers_pc:
hidden: true
binary_sensor.updater:
hidden: true
```
## automations.yaml
```yaml
cat automations.yaml
- id: '1573603852664'
alias: Kellerlicht automatisch aus (in der Nacht)
description: nach 23-07 Uhr
trigger:
- entity_id: switch.flurKeller
for:
hours: 0
minutes: 1
seconds: 0
from: 'Off'
platform: state
to: 'On'
condition:
- after: '23:00'
before: 07:00
condition: time
action:
- alias: ''
data:
entity_id: switch.flurKeller
service: switch.turn_off
```
## Switch in homea assistant environment
## Switch in home assistant environment
```bash
sudo -u homeassistant -H -s
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment