-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #87 from grimmpp/feature-branch
preparation for next release
- Loading branch information
Showing
21 changed files
with
443 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Send Message Service | ||
|
||
This service is mainly inteded to combine none-EnOcean and EnOcean devices. Services which cannot communicate nativcely because they are based on different communication protocols, you can use automations in Home Assistant to e.g. receive trigger from an none-EnOcean sender and send a EnOcean message to an relay or sync states of a thermostat. ... | ||
|
||
## Configuration | ||
|
||
<img src="send_message_automation_screenshot.png" height="300"/> | ||
|
||
Create an [automation](https://www.home-assistant.io/getting-started/automation/) in Home Assistant. Use the upper sections to react on anything you like, dependent on you sensor/sender. | ||
|
||
`Add Action` and search for `eltako`. It proposes a service to send messages for every available gateway. In addition you need to enter in the data section what to send. The fields `id` and `eep` must be specified. `id` stands for the sender address. (Keep in mind: bus gateways do not send in wireless network and wireless tranceivers do only have 128 hardcoded addresses to be used.) `eep` is the message format you what to use. Dependent on the eep specific information is put into the messages to be sent. You can either check in the [code](https://github.com/grimmpp/eltako14bus/blob/master/eltakobus/eep.py) or in the logs what attribute need to be set. | ||
|
||
<img src="send_message_logs_screenshot.png" /> | ||
|
||
Values of e.g. other sensers can also be dynamically added by | ||
``` | ||
alias: send message | ||
description: "" | ||
trigger: [] | ||
condition: [] | ||
action: | ||
- service: eltako.gateway_3_send_message | ||
metadata: {} | ||
data: | ||
id: FF-DD-00-01 | ||
eep: A5-10-06 | ||
current_temp: {{state_attr('climate.my_other_brands_smart_thermostat_1293127', 'current_temperature') }} | ||
target_temp: {{state_attr('climate.my_other_brands_smart_thermostat_1293127', 'target_temperature') }} | ||
enabled: true | ||
mode: single | ||
``` | ||
|
||
By triggering this example, from above, manually you will send a message via gateway 3 containing the current and target temperature of the thermostat entity 1293127. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import unittest | ||
from custom_components.eltako.sensor import * | ||
from mocks import HassMock | ||
from unittest import mock | ||
from mocks import * | ||
from homeassistant.helpers.entity import Entity | ||
from homeassistant.const import Platform | ||
from custom_components.eltako.binary_sensor import EltakoBinarySensor | ||
from eltakobus import * | ||
|
||
# mock update of Home Assistant | ||
Entity.schedule_update_ha_state = mock.Mock(return_value=None) | ||
# EltakoBinarySensor.hass.bus.fire is mocked by class HassMock | ||
|
||
|
||
class TestSensor_A5_04_01(unittest.TestCase): | ||
|
||
msg1 = Regular4BSMessage (address=b'\xFF\xFF\x00\x80', data=b'\xaa\x00\x00\x0d', status=0x00) | ||
|
||
def create_temperature_sensor(self) -> EltakoTemperatureSensor: | ||
gateway = GatewayMock() | ||
dev_id = AddressExpression.parse("FF-FF-00-80") | ||
dev_name = "device name" | ||
dev_eep = EEP.find("A5-04-01") | ||
s = EltakoTemperatureSensor(Platform.SENSOR, gateway, dev_id, dev_name, dev_eep) | ||
return s | ||
|
||
def create_humidity_sensor(self) -> EltakoHumiditySensor: | ||
gateway = GatewayMock() | ||
dev_id = AddressExpression.parse("FF-FF-00-80") | ||
dev_name = "device name" | ||
dev_eep = EEP.find("A5-04-01") | ||
s = EltakoHumiditySensor(Platform.SENSOR, gateway, dev_id, dev_name, dev_eep) | ||
return s | ||
|
||
def test_temperature_sensor_A5_04_02(self): | ||
s_temp = self.create_temperature_sensor() | ||
|
||
s_temp.value_changed(self.msg1) | ||
self.assertEqual(s_temp.native_value, 0.0) | ||
|
||
def test_humidity_sensor_A5_04_02(self): | ||
s_hum = self.create_humidity_sensor() | ||
|
||
s_hum.value_changed(self.msg1) | ||
self.assertEqual(s_hum.native_value, 0.0) |
Oops, something went wrong.