Skip to content

Commit

Permalink
Merge pull request #41 from grimmpp/feature-branch
Browse files Browse the repository at this point in the history
device supported improved
  • Loading branch information
grimmpp authored Sep 24, 2024
2 parents 648effc + 1c93d2a commit 3d01e00
Show file tree
Hide file tree
Showing 10 changed files with 167 additions and 12 deletions.
7 changes: 7 additions & 0 deletions changes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Change Log

## v0.1.34 Added more configuration templates for devices
* Added more configuration templates for devices
* Fixed configuration for FMZ
* Fixed send message for fired gateways
* Improved writing sender ids into actuators for EEP F6-02-01/02
* Added List for supported devices.

## v0.1.33 Added Supported Device View
* Improved template selection in Details View.
* Improved GUI Details View
Expand Down
86 changes: 86 additions & 0 deletions docs/supported-devices.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# List of Supported Devices
Devices not contained in this list are quite likely already supported by existing devices in this list.
<br />
(This list is auto-generated by using template definitions in [data_helper.py](https://github.com/grimmpp/enocean-device-manager/blob/main/eo_man/data/data_helper.py).)
<br />
| Brand | Name | Description | EEP | Sender EEP | HA Platform |
|-----|-----|-----|-----|-----|-----|
| Eltako | FAM14 | Bus Gateway | | | |
| Eltako | FGW14_USB | Bus Gateway | | | |
| Eltako | FTD14 | Bus Gateway | | | |
| Eltako | FGW14 | Bus Gateway | | | |
| Eltako | FAM-USB | USB Gateway | | | |
| unknown | USB300 | USB Gateway | | | |
| PioTek | MGW (LAN) | USB Gateway | | | |
| PioTek | MGW (USB) | USB Gateway | | | |
| Eltako | FTS14EM | Wired Rocker switch | F6-02-01 | | binary_sensor |
| Eltako | FTS14EM | Wired Rocker switch | F6-02-02 | | binary_sensor |
| Eltako | FTS14EM | Window handle | F6-10-00 | | binary_sensor |
| Eltako | FTS14EM | Contact sensor | D5-00-01 | | binary_sensor |
| Eltako | FTS14EM | Occupancy sensor | A5-08-01 | | binary_sensor |
| Eltako | FT55 | Wireless 4-way pushbutton | F6-02-01 | | binary_sensor |
| Eltako | F4T55E | Wireless 4-way pushbutton in E-Design55 | F6-02-01 | | binary_sensor |
| Eltako | FFTE | window and door contacts | F6-10-00 | | binary_sensor |
| Eltako | FTKE | window and door contacts | F6-10-00 | | binary_sensor |
| Eltako | FTK | window and door contacts | F6-10-00 | | binary_sensor |
| Eltako | FSDG14 | Electricity Meter | A5-12-01 | | sensor |
| Eltako | F3Z14D | Electricity Meter | A5-12-01 | | sensor |
| Eltako | FSVA-230V-10A-Power-Meter | Power Meter | A5-12-01 | | sensor |
| Eltako | F3Z14D | Gas Meter | A5-12-02 | | sensor |
| Eltako | F3Z14D | Water Meter | A5-12-03 | | sensor |
| Eltako | FWZ14_65A | Electricity Meter | A5-12-01 | | sensor |
| Eltako | FWG14MS | Weather Station Gateway | A5-13-01 | | sensor |
| Eltako | MS | Weather Station | A5-13-01 | | sensor |
| Eltako | WMS | Weather Station | A5-13-01 | | sensor |
| Eltako | FWS61 | Weather Station | A5-13-01 | | sensor |
| Eltako | FLGTF | Temperature and Humidity Sensor | A5-04-02 | | sensor |
| Eltako | FLT58 | Temperature and Humidity Sensor | A5-04-02 | | sensor |
| Eltako | FFT60 | Temperature and Humidity Sensor | A5-04-02 | | sensor |
| Eltako | FTFSB | Temperature and Humidity Sensor | A5-04-02 | | sensor |
| Eltako | FHD60SB | Light - Twilight and daylight Sensor | A5-06-01 | | sensor |
| Eltako | FABH65S | Light-, Temperature-, Occupancy Sensor | A5-08-01 | | sensor |
| Eltako | FBH65 | Light-, Temperature-, Occupancy Sensor | A5-08-01 | | sensor |
| Eltako | FBH65S | Light-, Temperature-, Occupancy Sensor | A5-08-01 | | sensor |
| Eltako | FBH65TF | Light-, Temperature-, Occupancy Sensor | A5-08-01 | | sensor |
| Eltako | FLGTF | Air Quality, Temperature and Humidity Sensor | A5-09-0C | | sensor |
| Eltako | FUTH | Temperature Sensor and Controller | A5-10-06 | | sensor |
| Eltako | FUTH-feature | Temperature Sensor and Controller and Humidity Sensor | A5-10-12 | | sensor |
| Eltako | FUD14 | Light dimmer | A5-38-08 | A5-38-08 | light |
| Eltako | FUD14_800W | Light dimmer | A5-38-08 | A5-38-08 | light |
| Eltako | FDG14 | Dali Gateway | A5-38-08 | A5-38-08 | light |
| Eltako | FD2G14 | Dali Gateway | A5-38-08 | A5-38-08 | light |
| Eltako | FMZ14 | Relay | M5-38-08 | F6-02-01 | light |
| Eltako | FSR14 | Relay | M5-38-08 | A5-38-08 | light |
| Eltako | FSR14_1x | Relay | M5-38-08 | A5-38-08 | light |
| Eltako | FSR14_2x | Relay | M5-38-08 | A5-38-08 | light |
| Eltako | FSR14_4x | Relay | M5-38-08 | A5-38-08 | light |
| Eltako | FSR14M_2x | Relay | M5-38-08 | A5-38-08 | light |
| Eltako | FSR14M_2x-feature | Electricity Meter | A5-12-01 | | sensor |
| Eltako | F4SR14_LED | Relay | M5-38-08 | A5-38-08 | light |
| Eltako | FSB14 | Cover | G5-3F-7F | H5-3F-7F | cover |
| Eltako | FHK14 | Heating/Cooling | A5-10-06 | A5-10-06 | climate |
| Eltako | F4HK14 | Heating/Cooling | A5-10-06 | A5-10-06 | climate |
| Eltako | FAE14SSR | Heating/Cooling | A5-10-06 | A5-10-06 | climate |
| Eltako | FMZ61 | Relay | M5-38-08 | F6-02-01 | light |
| Eltako | FSR61-230V | Relay | M5-38-08 | A5-38-08 | light |
| Eltako | FSR61NP-230V | Relay | M5-38-08 | A5-38-08 | light |
| Eltako | FSR61/8-24V UC | Relay | M5-38-08 | A5-38-08 | light |
| Eltako | FSR61-230V | Relay | M5-38-08 | A5-38-08 | light |
| Eltako | FSR61G-230V | Relay | M5-38-08 | A5-38-08 | light |
| Eltako | FSR61LN-230V | Relay | M5-38-08 | A5-38-08 | light |
| Eltako | FLC61NP-230V | Relay | M5-38-08 | A5-38-08 | light |
| Eltako | FR62-230V | Relay | M5-38-08 | A5-38-08 | light |
| Eltako | FR62NP-230V | Relay | M5-38-08 | A5-38-08 | light |
| Eltako | FL62-230V | Relay | M5-38-08 | A5-38-08 | light |
| Eltako | FL62NP-230V | Relay | M5-38-08 | A5-38-08 | light |
| Eltako | FSSA-230V | Socket Switch Actuator | M5-38-08 | A5-38-08 | light |
| Eltako | FSVA-230V-10A | Socket Switch Actuator | M5-38-08 | A5-38-08 | light |
| Eltako | FUD61NP-230V | Light dimmer | A5-38-08 | A5-38-08 | light |
| Eltako | FUD61NPN-230V | Light dimmer | A5-38-08 | A5-38-08 | light |
| Eltako | FD62NP-230V | Relay | A5-38-08 | A5-38-08 | light |
| Eltako | FD62NPN-230V | Relay | A5-38-08 | A5-38-08 | light |
| Eltako | FSB61-230V | Cover | G5-3F-7F | H5-3F-7F | cover |
| Eltako | FSB61NP-230V | Cover | G5-3F-7F | H5-3F-7F | cover |
| Eltako | FJ62/12-36V DC | Cover | G5-3F-7F | H5-3F-7F | cover |
| Eltako | FJ62NP-230V | Cover | G5-3F-7F | H5-3F-7F | cover |
| Eltako | FSUD-230V | Cover | G5-3F-7F | H5-3F-7F | cover |
2 changes: 1 addition & 1 deletion eo_man/controller/serial_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def get_serial_ports(self, device_type:str, force_reload:bool=False) ->list[str]
return []

def is_connected_gateway_device_bus(self):
return self.connected_gateway_type == 'FAM14' or self.connected_gateway_type == 'FGW14-USB'
return self.connected_gateway_type.startswith('FAM14') or self.connected_gateway_type.startswith('FGW14-USB')

def _get_gateway2serial_port_mapping(self) -> dict[str:list[str]]:
""" Lists serial port names
Expand Down
2 changes: 1 addition & 1 deletion eo_man/data/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from typing import Final

from homeassistant.const import Platform
from homeassistant.const import *

DOMAIN: Final = "eltako"
DATA_ELTAKO: Final = "eltako"
Expand Down
31 changes: 27 additions & 4 deletions eo_man/data/data_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@
# metering
{'hw-type': 'FSDG14', 'brand': 'Eltako', CONF_EEP: 'A5-12-01', CONF_TYPE: Platform.SENSOR, 'description': 'Electricity Meter', 'address_count': 1},
{'hw-type': 'F3Z14D', 'brand': 'Eltako', CONF_EEP: 'A5-12-01', CONF_TYPE: Platform.SENSOR, 'description': 'Electricity Meter', 'address_count': 3},
{'hw-type': 'FSVA-230V-10A-Power-Meter', 'brand': 'Eltako', CONF_EEP: 'A5-12-01', CONF_TYPE: Platform.SENSOR, CONF_METER_TARIFFS: '[]', 'description': 'Power Meter', 'address_count': 1},
{'hw-type': 'F3Z14D', 'brand': 'Eltako', CONF_EEP: 'A5-12-02', CONF_TYPE: Platform.SENSOR, 'description': 'Gas Meter', 'address_count': 3},
{'hw-type': 'F3Z14D', 'brand': 'Eltako', CONF_EEP: 'A5-12-03', CONF_TYPE: Platform.SENSOR, 'description': 'Water Meter', 'address_count': 3},
{'hw-type': 'FWZ14_65A', 'brand': 'Eltako', CONF_EEP: 'A5-12-01', CONF_TYPE: Platform.SENSOR, CONF_METER_TARIFFS: '[]', 'description': 'Electricity Meter', 'address_count': 1},

# Weather Station
{'hw-type': 'FWG14MS', 'brand': 'Eltako', CONF_EEP: 'A5-13-01', CONF_TYPE: Platform.SENSOR, 'description': 'Weather Station Gateway', 'address_count': 1},
Expand All @@ -57,6 +59,10 @@
{'hw-type': 'FLGTF', 'brand': 'Eltako', CONF_EEP: 'A5-04-02', CONF_TYPE: Platform.SENSOR, 'description': 'Temperature and Humidity Sensor', 'address_count': 1},
{'hw-type': 'FLT58', 'brand': 'Eltako', CONF_EEP: 'A5-04-02', CONF_TYPE: Platform.SENSOR, 'description': 'Temperature and Humidity Sensor', 'address_count': 1},
{'hw-type': 'FFT60', 'brand': 'Eltako', CONF_EEP: 'A5-04-02', CONF_TYPE: Platform.SENSOR, 'description': 'Temperature and Humidity Sensor', 'address_count': 1},
{'hw-type': 'FTFSB', 'brand': 'Eltako', CONF_EEP: 'A5-04-02', CONF_TYPE: Platform.SENSOR, 'description': 'Temperature and Humidity Sensor', 'address_count': 1},

# light sensor
{'hw-type': 'FHD60SB', 'brand': 'Eltako', CONF_EEP: 'A5-06-01', CONF_TYPE: Platform.SENSOR, 'description': 'Light - Twilight and daylight Sensor', 'address_count': 1},

# occupancy sensor
{'hw-type': 'FABH65S', 'brand': 'Eltako', CONF_EEP: 'A5-08-01', CONF_TYPE: Platform.SENSOR, 'description': 'Light-, Temperature-, Occupancy Sensor', 'address_count': 1},
Expand All @@ -80,7 +86,7 @@
{'hw-type': 'FD2G14', 'brand': 'Eltako', CONF_EEP: 'A5-38-08', 'sender_eep': 'A5-38-08', CONF_TYPE: Platform.LIGHT, 'PCT14-function-group': 1, 'PCT14-key-function': 32, 'description': 'Dali Gateway', 'address_count': 16},

# relays
{'hw-type': 'FMZ14', 'brand': 'Eltako', CONF_EEP: 'M5-38-08', 'sender_eep': 'A5-38-08', CONF_TYPE: Platform.LIGHT, 'PCT14-function-group': 1, 'description': 'Relay', 'address_count': 1},
{'hw-type': 'FMZ14', 'brand': 'Eltako', CONF_EEP: 'M5-38-08', 'sender_eep': 'F6-02-01', CONF_TYPE: Platform.LIGHT, 'PCT14-function-group': 1, 'PCT14-key-function': 1, 'description': 'Relay', 'address_count': 1},
{'hw-type': 'FSR14', 'brand': 'Eltako', CONF_EEP: 'M5-38-08', 'sender_eep': 'A5-38-08', CONF_TYPE: Platform.LIGHT, 'PCT14-function-group': 2, 'PCT14-key-function': 51, 'description': 'Relay', 'address_count': 1},
{'hw-type': 'FSR14_1x', 'brand': 'Eltako', CONF_EEP: 'M5-38-08', 'sender_eep': 'A5-38-08', CONF_TYPE: Platform.LIGHT, 'PCT14-function-group': 2, 'PCT14-key-function': 51, 'description': 'Relay', 'address_count': 1},
{'hw-type': 'FSR14_2x', 'brand': 'Eltako', CONF_EEP: 'M5-38-08', 'sender_eep': 'A5-38-08', CONF_TYPE: Platform.LIGHT, 'PCT14-function-group': 2, 'PCT14-key-function': 51, 'description': 'Relay', 'address_count': 2},
Expand All @@ -98,15 +104,33 @@
{'hw-type': 'FAE14SSR', 'brand': 'Eltako', CONF_EEP: 'A5-10-06', 'sender_eep': 'A5-10-06', CONF_TYPE: Platform.CLIMATE, 'PCT14-function-group': 3, 'PCT14-key-function': 65, 'description': 'Heating/Cooling', 'address_count': 2},

# decentralized relays
{'hw-type': 'FSR61NP', 'brand': 'Eltako', CONF_EEP: 'M5-38-08', 'sender_eep': 'A5-38-08', CONF_TYPE: Platform.LIGHT, 'description': 'Relay', 'address_count': 1},
{'hw-type': 'FMZ61', 'brand': 'Eltako', CONF_EEP: 'M5-38-08', 'sender_eep': 'F6-02-01', CONF_TYPE: Platform.LIGHT, 'description': 'Relay', 'address_count': 1},
{'hw-type': 'FSR61-230V', 'brand': 'Eltako', CONF_EEP: 'M5-38-08', 'sender_eep': 'A5-38-08', CONF_TYPE: Platform.LIGHT, 'description': 'Relay', 'address_count': 1},
{'hw-type': 'FSR61NP-230V', 'brand': 'Eltako', CONF_EEP: 'M5-38-08', 'sender_eep': 'A5-38-08', CONF_TYPE: Platform.LIGHT, 'description': 'Relay', 'address_count': 1},
{'hw-type': 'FSR61/8-24V UC', 'brand': 'Eltako', CONF_EEP: 'M5-38-08', 'sender_eep': 'A5-38-08', CONF_TYPE: Platform.LIGHT, 'description': 'Relay', 'address_count': 1},
{'hw-type': 'FSR61-230V', 'brand': 'Eltako', CONF_EEP: 'M5-38-08', 'sender_eep': 'A5-38-08', CONF_TYPE: Platform.LIGHT, 'description': 'Relay', 'address_count': 1},
{'hw-type': 'FSR61G-230V', 'brand': 'Eltako', CONF_EEP: 'M5-38-08', 'sender_eep': 'A5-38-08', CONF_TYPE: Platform.LIGHT, 'description': 'Relay', 'address_count': 1},
{'hw-type': 'FSR61LN-230V', 'brand': 'Eltako', CONF_EEP: 'M5-38-08', 'sender_eep': 'A5-38-08', CONF_TYPE: Platform.LIGHT, 'description': 'Relay', 'address_count': 1},
{'hw-type': 'FSR61LN-230V', 'brand': 'Eltako', CONF_EEP: 'M5-38-08', 'sender_eep': 'A5-38-08', CONF_TYPE: Platform.LIGHT, 'description': 'Relay', 'address_count': 2},
{'hw-type': 'FLC61NP-230V', 'brand': 'Eltako', CONF_EEP: 'M5-38-08', 'sender_eep': 'A5-38-08', CONF_TYPE: Platform.LIGHT, 'description': 'Relay', 'address_count': 1},
{'hw-type': 'FR62-230V', 'brand': 'Eltako', CONF_EEP: 'M5-38-08', 'sender_eep': 'A5-38-08', CONF_TYPE: Platform.LIGHT, 'description': 'Relay', 'address_count': 1},
{'hw-type': 'FR62NP-230V', 'brand': 'Eltako', CONF_EEP: 'M5-38-08', 'sender_eep': 'A5-38-08', CONF_TYPE: Platform.LIGHT, 'description': 'Relay', 'address_count': 1},
{'hw-type': 'FL62-230V', 'brand': 'Eltako', CONF_EEP: 'M5-38-08', 'sender_eep': 'A5-38-08', CONF_TYPE: Platform.LIGHT, 'description': 'Relay', 'address_count': 1},
{'hw-type': 'FL62NP-230V', 'brand': 'Eltako', CONF_EEP: 'M5-38-08', 'sender_eep': 'A5-38-08', CONF_TYPE: Platform.LIGHT, 'description': 'Relay', 'address_count': 1},
{'hw-type': 'FSSA-230V', 'brand': 'Eltako', CONF_EEP: 'M5-38-08', 'sender_eep': 'A5-38-08', CONF_TYPE: Platform.LIGHT, 'description': 'Socket Switch Actuator', 'address_count': 1},
{'hw-type': 'FSVA-230V-10A', 'brand': 'Eltako', CONF_EEP: 'M5-38-08', 'sender_eep': 'A5-38-08', CONF_TYPE: Platform.LIGHT, 'description': 'Socket Switch Actuator', 'address_count': 1},

# decentralized dimmers
{'hw-type': 'FUD61NP-230V', 'brand': 'Eltako', CONF_EEP: 'A5-38-08', 'sender_eep': 'A5-38-08', CONF_TYPE: Platform.LIGHT, 'description': 'Light dimmer', 'address_count': 1},
{'hw-type': 'FUD61NPN-230V', 'brand': 'Eltako', CONF_EEP: 'A5-38-08', 'sender_eep': 'A5-38-08', CONF_TYPE: Platform.LIGHT, 'description': 'Light dimmer', 'address_count': 1},
{'hw-type': 'FD62NP-230V', 'brand': 'Eltako', CONF_EEP: 'A5-38-08', 'sender_eep': 'A5-38-08', CONF_TYPE: Platform.LIGHT, 'description': 'Relay', 'address_count': 1},
{'hw-type': 'FD62NPN-230V', 'brand': 'Eltako', CONF_EEP: 'A5-38-08', 'sender_eep': 'A5-38-08', CONF_TYPE: Platform.LIGHT, 'description': 'Relay', 'address_count': 1},

# decentralized covers
{'hw-type': 'FSB61-230V', 'brand': 'Eltako', CONF_EEP: 'G5-3F-7F', 'sender_eep': 'H5-3F-7F', CONF_TYPE: Platform.COVER, 'address_count': 1, 'description': 'Cover'},
{'hw-type': 'FSB61NP-230V', 'brand': 'Eltako', CONF_EEP: 'G5-3F-7F', 'sender_eep': 'H5-3F-7F', CONF_TYPE: Platform.COVER, 'address_count': 1, 'description': 'Cover'},
{'hw-type': 'FJ62/12-36V DC', 'brand': 'Eltako', CONF_EEP: 'G5-3F-7F', 'sender_eep': 'H5-3F-7F', CONF_TYPE: Platform.COVER, 'address_count': 1, 'description': 'Cover'},
{'hw-type': 'FJ62NP-230V', 'brand': 'Eltako', CONF_EEP: 'G5-3F-7F', 'sender_eep': 'H5-3F-7F', CONF_TYPE: Platform.COVER, 'address_count': 1, 'description': 'Cover'},
{'hw-type': 'FSUD-230V', 'brand': 'Eltako', CONF_EEP: 'G5-3F-7F', 'sender_eep': 'H5-3F-7F', CONF_TYPE: Platform.COVER, 'address_count': 1, 'description': 'Cover'},
]

ORG_MAPPING = {
Expand All @@ -117,7 +141,6 @@

SENSOR_MESSAGE_TYPES = [EltakoWrappedRPS, EltakoWrapped4BS, RPSMessage, Regular4BSMessage, Regular1BSMessage, EltakoMessage]


def get_all_eep_names():
subclasses = set()
work = [EEP]
Expand Down
3 changes: 1 addition & 2 deletions eo_man/view/device_info_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from tkscrolledframe import ScrolledFrame

from ..data.const import *
from homeassistant.const import *

from .donation_button import DonationButton

Expand Down Expand Up @@ -55,8 +54,8 @@ def __init__(self, main:Tk):
m.get('hw-type', ''),
m.get('description', ''),
m.get(CONF_EEP, ''),
m.get(CONF_TYPE, ''),
m.get('sender_eep', ''),
m.get(CONF_TYPE, ''),
m.get('docs', '')
))

Expand Down
6 changes: 5 additions & 1 deletion eo_man/view/send_message_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,11 @@ def close(self):


def set_sender_ids(self):
base_id = self.serial_controller.current_base_id
# not wired gateway
if not self.serial_controller.is_connected_gateway_device_bus():
base_id = self.serial_controller.current_base_id
else:
base_id = '00-00-B0-00'

if self.serial_controller.current_base_id and not self.serial_controller.is_connected_gateway_device_bus():
base_id = self.serial_controller.current_base_id
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
aiocoap==0.4.7
eltako14bus==0.0.62
eltako14bus==0.0.63
numpy==1.26.3
pillow==10.2.0
pyserial==3.5
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
with open('LICENSE', encoding="utf-8") as f:
license = f.read()

required = ['eltako14bus==0.0.62', 'requests==2.31.0', 'enocean==0.60.1', 'pyserial', 'pyserial-asyncio', 'aiocoap',
required = ['eltako14bus==0.0.63', 'requests==2.31.0', 'enocean==0.60.1', 'pyserial', 'pyserial-asyncio', 'aiocoap',
'tkScrolledFrame==1.0.4',
'esp2_gateway_adapter==0.2.9',
# 'homeassistant',
Expand All @@ -28,7 +28,7 @@

setup(
name='eo_man',
version='0.1.33',
version='0.1.34',
package_dir={'eo_man':"eo_man"},
# packages=find_packages("./eo-man"),
#package_data={'': ['*.png']},
Expand Down
36 changes: 36 additions & 0 deletions tests/test_generate_docs.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import os
import sys
import unittest

file_dir = os.path.join( os.path.dirname(__file__), '..', 'eo_man', 'data')
sys.path.append(file_dir)
__import__('homeassistant')

from eo_man.data.data_helper import EEP_MAPPING
from eo_man.data.const import CONF_EEP, CONF_TYPE

class TestGenerateDocs(unittest.TestCase):

def test_generate_list_of_supported_devices(self):
text = "# List of Supported Devices \n"
text += "Devices not contained in this list are quite likely already supported by existing devices in this list. \n"

text += "<br />\n"
text += "(This list is auto-generated by using template definitions in [data_helper.py](https://github.com/grimmpp/enocean-device-manager/blob/main/eo_man/data/data_helper.py).) \n"
text += "<br />\n"

text += "| Brand | Name | Description | EEP | Sender EEP | HA Platform | \n"
keys = ['brand', 'hw-type', 'description', CONF_EEP, 'sender_eep', CONF_TYPE]
for k in keys:
text += "|-----"
text += "| \n"

for e in EEP_MAPPING:
if e.get('hw-type', '') is not 'BusObject':
for k in keys:
text += f"| {e.get(k, '')} "
text += "| \n"

file='./docs/supported-devices.md'
with open(file, 'w') as filetowrite:
filetowrite.write(text)

0 comments on commit 3d01e00

Please sign in to comment.