Conversation
Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
Member
|
@victorgarcia98 Apologies for a late response. I do not work at TNO anymore and it took some time to get settled in my new situation again. Reviewing now! |
# Conflicts: # src/s2python/generated/gen_s2.py
…ut-file-type openapi --output src/s2python/generated/gen_s2.py` Signed-off-by: F.N. Claessen <felix@seita.nl>
…s2-message/literals # Conflicts: # src/s2python/common/handshake.py # src/s2python/common/handshake_response.py # src/s2python/common/instruction_status_update.py # src/s2python/common/number_range.py # src/s2python/common/power_forecast.py # src/s2python/common/power_forecast_element.py # src/s2python/common/power_forecast_value.py # src/s2python/common/power_measurement.py # src/s2python/common/power_range.py # src/s2python/common/power_value.py # src/s2python/common/reception_status.py # src/s2python/common/resource_manager_details.py # src/s2python/common/revoke_object.py # src/s2python/common/role.py # src/s2python/common/select_control_type.py # src/s2python/common/session_request.py # src/s2python/common/timer.py # src/s2python/common/transition.py # src/s2python/frbc/frbc_actuator_description.py # src/s2python/frbc/frbc_actuator_status.py # src/s2python/frbc/frbc_fill_level_target_profile.py # src/s2python/frbc/frbc_fill_level_target_profile_element.py # src/s2python/frbc/frbc_instruction.py # src/s2python/frbc/frbc_leakage_behaviour.py # src/s2python/frbc/frbc_leakage_behaviour_element.py # src/s2python/frbc/frbc_operation_mode.py # src/s2python/frbc/frbc_operation_mode_element.py # src/s2python/frbc/frbc_storage_description.py # src/s2python/frbc/frbc_storage_status.py # src/s2python/frbc/frbc_system_description.py # src/s2python/frbc/frbc_timer_status.py # src/s2python/frbc/frbc_usage_forecast.py # src/s2python/frbc/frbc_usage_forecast_element.py # src/s2python/generated/gen_s2.py
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
This reverts commit fd59de6.
Collaborator
|
As suggested, I removed all changes relating to the Literal issue. This PR now only contains the addition of the (On a side note, Home Assistant has now released a version compatible with Pydantic v2. 😅 ) |
lfse-slafleur
previously requested changes
Jan 16, 2025
Member
lfse-slafleur
left a comment
There was a problem hiding this comment.
Thanks for the addition! I added a couple of comments as examples but I believe we should be able to limit a number of types from S2MessageComponent to S2Message as only messages are expected there.
Signed-off-by: F.N. Claessen <felix@seita.nl>
…ble type "str": "type[PPBCScheduleInstruction]"; expected "str": "Union[type[FRBCActuatorStatus], type[FRBCFillLevelTargetProfile], type[FRBCInstruction], type[FRBCLeakageBehaviour], type[FRBCStorageStatus], <13 more items>]" [dict-item]` Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
…lated to flexiblepower/s2-ws-json#21) Signed-off-by: F.N. Claessen <felix@seita.nl>
… bug? Related to flexiblepower/s2-ws-json#21)" This reverts commit dc3d706.
… under flexiblepower/s2-ws-json#21 instead Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Flix6x
approved these changes
Jan 23, 2025
Collaborator
Flix6x
left a comment
There was a problem hiding this comment.
Approved by Víctor and I.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Recently, I had the need to wrap the S2 messages in an envelope to simulate accelerated interactions between a CEM and a RM.
Nonetheless, for this to work, the
message_typehad to be aLiteral. This PR refactors the code to use Literals instead of regular fields.Example usage: